.TH cmakemodules 1 "December 30, 2011" "cmake 2.8.7"
.SH NAME
.PP
cmakemodules \- Reference of available CMake modules.

.SH DESCRIPTION
.PP
The "cmake" executable is the CMake command\-line interface.  It may be used to configure projects in scripts.  Project configuration settings may be specified on the command line with the \-D option.  The \-i option will cause cmake to interactively prompt for such settings.

.PP
CMake is a cross\-platform build system generator.  Projects specify their build process with platform\-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform.

.SH MODULES
.PP
The following modules are provided with CMake. They can be used with INCLUDE(ModuleName).

.PP
.nf
  CMake Modules \- Modules coming with CMake, the Cross\-Platform Makefile Generator.
.fi

.PP
This is the documentation for the modules and scripts coming with CMake. Using these modules you can check the computer system for installed software packages, features of the compiler and the existance of headers to name just a few.

.TP
.B AddFileDependencies
ADD_FILE_DEPENDENCIES(source_file depend_files...)

Adds the given files as dependencies to source_file


.TP
.B BundleUtilities
Functions to help assemble a standalone bundle application.

A collection of CMake utility functions useful for dealing with .app bundles on the Mac and bundle\-like directories on any OS.


The following functions are provided by this module:


.nf
   fixup_bundle
   copy_and_fixup_bundle
   verify_app
   get_bundle_main_executable
   get_dotapp_dir
   get_bundle_and_executable
   get_bundle_all_executables
   get_item_key
   clear_bundle_keys
   set_bundle_key_values
   get_bundle_keys
   copy_resolved_item_into_bundle
   copy_resolved_framework_into_bundle
   fixup_bundle_item
   verify_bundle_prerequisites
   verify_bundle_symlinks
.fi

Requires CMake 2.6 or greater because it uses function, break and PARENT_SCOPE. Also depends on GetPrerequisites.cmake.


.nf
  FIXUP_BUNDLE(<app> <libs> <dirs>)
.fi

Fix up a bundle in\-place and make it standalone, such that it can be drag\-n\-drop copied to another machine and run on that machine as long as all of the system libraries are compatible.


If you pass plugins to fixup_bundle as the libs parameter, you should install them or copy them into the bundle before calling fixup_bundle. The "libs" parameter is a list of libraries that must be fixed up, but that cannot be determined by otool output analysis. (i.e., plugins)


Gather all the keys for all the executables and libraries in a bundle, and then, for each key, copy each prerequisite into the bundle. Then fix each one up according to its own list of prerequisites.


Then clear all the keys and call verify_app on the final bundle to ensure that it is truly standalone.


.nf
  COPY_AND_FIXUP_BUNDLE(<src> <dst> <libs> <dirs>)
.fi

Makes a copy of the bundle <src> at location <dst> and then fixes up the new copied bundle in\-place at <dst>...


.nf
  VERIFY_APP(<app>)
.fi

Verifies that an application <app> appears valid based on running analysis tools on it. Calls "message(FATAL_ERROR" if the application is not verified.


.nf
  GET_BUNDLE_MAIN_EXECUTABLE(<bundle> <result_var>)
.fi

The result will be the full path name of the bundle's main executable file or an "error:" prefixed string if it could not be determined.


.nf
  GET_DOTAPP_DIR(<exe> <dotapp_dir_var>)
.fi

Returns the nearest parent dir whose name ends with ".app" given the full path to an executable. If there is no such parent dir, then simply return the dir containing the executable.


The returned directory may or may not exist.


.nf
  GET_BUNDLE_AND_EXECUTABLE(<app> <bundle_var> <executable_var> <valid_var>)
.fi

Takes either a ".app" directory name or the name of an executable nested inside a ".app" directory and returns the path to the ".app" directory in <bundle_var> and the path to its main executable in <executable_var>


.nf
  GET_BUNDLE_ALL_EXECUTABLES(<bundle> <exes_var>)
.fi

Scans the given bundle recursively for all executable files and accumulates them into a variable.


.nf
  GET_ITEM_KEY(<item> <key_var>)
.fi

Given a file (item) name, generate a key that should be unique considering the set of libraries that need copying or fixing up to make a bundle standalone. This is essentially the file name including extension with "." replaced by "_"


This key is used as a prefix for CMake variables so that we can associate a set of variables with a given item based on its key.


.nf
  CLEAR_BUNDLE_KEYS(<keys_var>)
.fi

Loop over the list of keys, clearing all the variables associated with each key. After the loop, clear the list of keys itself.


Caller of get_bundle_keys should call clear_bundle_keys when done with list of keys.


.nf
  SET_BUNDLE_KEY_VALUES(<keys_var> <context> <item> <exepath> <dirs>
                        <copyflag>)
.fi

Add a key to the list (if necessary) for the given item. If added, also set all the variables associated with that key.


.nf
  GET_BUNDLE_KEYS(<app> <libs> <dirs> <keys_var>)
.fi

Loop over all the executable and library files within the bundle (and given as extra <libs>) and accumulate a list of keys representing them. Set values associated with each key such that we can loop over all of them and copy prerequisite libs into the bundle and then do appropriate install_name_tool fixups.


.nf
  COPY_RESOLVED_ITEM_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
.fi

Copy a resolved item into the bundle if necessary. Copy is not necessary if the resolved_item is "the same as" the resolved_embedded_item.


.nf
  COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
.fi

Copy a resolved framework into the bundle if necessary. Copy is not necessary if the resolved_item is "the same as" the resolved_embedded_item.


By default, BU_COPY_FULL_FRAMEWORK_CONTENTS is not set. If you want full frameworks embedded in your bundles, set BU_COPY_FULL_FRAMEWORK_CONTENTS to ON before calling fixup_bundle. By default, COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE copies the framework dylib itself plus the framework Resources directory.


.nf
  FIXUP_BUNDLE_ITEM(<resolved_embedded_item> <exepath> <dirs>)
.fi

Get the direct/non\-system prerequisites of the resolved embedded item. For each prerequisite, change the way it is referenced to the value of the _EMBEDDED_ITEM keyed variable for that prerequisite. (Most likely changing to an "@executable_path" style reference.)


This function requires that the resolved_embedded_item be "inside" the bundle already. In other words, if you pass plugins to fixup_bundle as the libs parameter, you should install them or copy them into the bundle before calling fixup_bundle. The "libs" parameter is a list of libraries that must be fixed up, but that cannot be determined by otool output analysis. (i.e., plugins)


Also, change the id of the item being fixed up to its own _EMBEDDED_ITEM value.


Accumulate changes in a local variable and make *one* call to install_name_tool at the end of the function with all the changes at once.


If the BU_CHMOD_BUNDLE_ITEMS variable is set then bundle items will be marked writable before install_name_tool tries to change them.


.nf
  VERIFY_BUNDLE_PREREQUISITES(<bundle> <result_var> <info_var>)
.fi

Verifies that the sum of all prerequisites of all files inside the bundle are contained within the bundle or are "system" libraries, presumed to exist everywhere.


.nf
  VERIFY_BUNDLE_SYMLINKS(<bundle> <result_var> <info_var>)
.fi

Verifies that any symlinks found in the bundle point to other files that are already also in the bundle... Anything that points to an external file causes this function to fail the verification.

.TP
.B CMakeBackwardCompatibilityCXX
define a bunch of backwards compatibility variables

.nf
  CMAKE_ANSI_CXXFLAGS \- flag for ansi c++ 
  CMAKE_HAS_ANSI_STRING_STREAM \- has <strstream>
  INCLUDE(TestForANSIStreamHeaders)
  INCLUDE(CheckIncludeFileCXX)
  INCLUDE(TestForSTDNamespace)
  INCLUDE(TestForANSIForScope)
.fi

.TP
.B CMakeDependentOption
Macro to provide an option dependent on other options.

This macro presents an option to the user only if a set of other conditions are true.  When the option is not presented a default value is used, but any value set by the user is preserved for when the option is presented again. Example invocation:


.nf
  CMAKE_DEPENDENT_OPTION(USE_FOO "Use Foo" ON
                         "USE_BAR;NOT USE_ZOT" OFF)
.fi

If USE_BAR is true and USE_ZOT is false, this provides an option called USE_FOO that defaults to ON.  Otherwise, it sets USE_FOO to OFF.  If the status of USE_BAR or USE_ZOT ever changes, any value for the USE_FOO option is saved so that when the option is re\-enabled it retains its old value.

.TP
.B CMakeDetermineVSServicePack
Includes a public function for assisting users in trying to determine the

Visual Studio service pack in use.


Sets the passed in variable to one of the following values or an empty string if unknown.


.nf
    vc80
    vc80sp1
    vc90
    vc90sp1
    vc100
    vc100sp1
.fi




Usage: ===========================


.nf
    if(MSVC)
       include(CMakeDetermineVSServicePack)
       DetermineVSServicePack( my_service_pack )
.fi




.nf
       if( my_service_pack )
           message(STATUS "Detected: ${my_service_pack}")
       endif()
    endif()
.fi




===========================

.TP
.B CMakeFindFrameworks
helper module to find OSX frameworks

.TP
.B CMakeFindPackageMode
.nf
 
.fi

This file is executed by cmake when invoked with \-\-find\-package. It expects that the following variables are set using \-D:


.nf
   NAME = name of the package
   COMPILER_ID = the CMake compiler ID for which the result is, i.e. GNU/Intel/Clang/MSVC, etc.
   LANGUAGE = language for which the result will be used, i.e. C/CXX/Fortan/ASM
   MODE = EXIST : only check for existance of the given package
          COMPILE : print the flags needed for compiling an object file which uses the given package
          LINK : print the flags needed for linking when using the given package
   QUIET = if TRUE, don't print anything
.fi

.TP
.B CMakeForceCompiler
.nf
 
.fi

This module defines macros intended for use by cross\-compiling toolchain files when CMake is not able to automatically detect the compiler identification.


Macro CMAKE_FORCE_C_COMPILER has the following signature:


.nf
   CMAKE_FORCE_C_COMPILER(<compiler> <compiler\-id>)
.fi

It sets CMAKE_C_COMPILER to the given compiler and the cmake internal variable CMAKE_C_COMPILER_ID to the given compiler\-id. It also bypasses the check for working compiler and basic compiler information tests.


Macro CMAKE_FORCE_CXX_COMPILER has the following signature:


.nf
   CMAKE_FORCE_CXX_COMPILER(<compiler> <compiler\-id>)
.fi

It sets CMAKE_CXX_COMPILER to the given compiler and the cmake internal variable CMAKE_CXX_COMPILER_ID to the given compiler\-id. It also bypasses the check for working compiler and basic compiler information tests.


Macro CMAKE_FORCE_Fortran_COMPILER has the following signature:


.nf
   CMAKE_FORCE_Fortran_COMPILER(<compiler> <compiler\-id>)
.fi

It sets CMAKE_Fortran_COMPILER to the given compiler and the cmake internal variable CMAKE_Fortran_COMPILER_ID to the given compiler\-id. It also bypasses the check for working compiler and basic compiler information tests.


So a simple toolchain file could look like this:


.nf
   INCLUDE (CMakeForceCompiler)
   SET(CMAKE_SYSTEM_NAME Generic)
   CMAKE_FORCE_C_COMPILER   (chc12 MetrowerksHicross)
   CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross)
.fi

.TP
.B CMakeParseArguments
.nf
 
.fi

CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)


CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for parsing the arguments given to that macro or function. It processes the arguments and defines a set of variables which hold the values of the respective options.


The <options> argument contains all options for the respective macro, i.e. keywords which can be used when calling the macro without any value following, like e.g. the OPTIONAL keyword of the install() command.


The <one_value_keywords> argument contains all keywords for this macro which are followed by one value, like e.g. DESTINATION keyword of the install() command.


The <multi_value_keywords> argument contains all keywords for this macro which can be followed by more than one value, like e.g. the TARGETS or FILES keywords of the install() command.


When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the keywords listed in <options>, <one_value_keywords> and <multi_value_keywords> a variable composed of the given <prefix> followed by "_" and the name of the respective keyword. These variables will then hold the respective value from the argument list. For the <options> keywords this will be TRUE or FALSE.


All remaining arguments are collected in a variable <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see whether your macro was called with unrecognized parameters.


As an example here a my_install() macro, which takes similar arguments as the real install() command:


.nf
   function(MY_INSTALL)
     set(options OPTIONAL FAST)
     set(oneValueArgs DESTINATION RENAME)
     set(multiValueArgs TARGETS CONFIGURATIONS)
     cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
     ...
.fi




Assume my_install() has been called like this:


.nf
   my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
.fi




After the cmake_parse_arguments() call the macro will have set the following variables:


.nf
   MY_INSTALL_OPTIONAL = TRUE
   MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
   MY_INSTALL_DESTINATION = "bin"
   MY_INSTALL_RENAME = "" (was not used)
   MY_INSTALL_TARGETS = "foo;bar"
   MY_INSTALL_CONFIGURATIONS = "" (was not used)
   MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
.fi




You can the continue and process these variables.


Keywords terminate lists of values, e.g. if directly after a one_value_keyword another recognized keyword follows, this is interpreted as the beginning of the new option. E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.

.TP
.B CMakePrintSystemInformation
print system information

This file can be used for diagnostic purposes just include it in a project to see various internal CMake variables.

.TP
.B CMakePushCheckState
.nf
 
.fi

This module defines two macros: CMAKE_PUSH_CHECK_STATE() and CMAKE_POP_CHECK_STATE() These two macros can be used to save and restore the state of the variables CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS, CMAKE_REQUIRED_LIBRARIES and CMAKE_REQUIRED_INCLUDES used by the various Check\-files coming with CMake, like e.g. check_function_exists() etc. The variable contents are pushed on a stack, pushing multiple times is supported. This is useful e.g. when executing such tests in a Find\-module, where they have to be set, but after the Find\-module has been executed they should have the same value as they had before.


Usage:


.nf
   cmake_push_check_state()
   set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} \-DSOME_MORE_DEF)
   check_function_exists(...)
   cmake_pop_check_state()
.fi

.TP
.B CMakeVerifyManifest
.nf
 
.fi

CMakeVerifyManifest.cmake


This script is used to verify that embeded manifests and side by side manifests for a project match.  To run this script, cd to a directory and run the script with cmake \-P. On the command line you can pass in versions that are OK even if not found in the .manifest files. For example,  cmake \-Dallow_versions=8.0.50608.0 \-PCmakeVerifyManifest.cmake could be used to allow an embeded manifest of 8.0.50608.0 to be used in a project even if that version was not found in the .manifest file.

.TP
.B CPack
foreach generator, it then




The CPack module generates binary and source installers in a variety of formats using the cpack program. Inclusion of the CPack module adds two new targets to the resulting makefiles, package and package_source, which build the binary and source installers, respectively. The generated binary installers contain everything installed via CMake's INSTALL command (and the deprecated INSTALL_FILES, INSTALL_PROGRAMS, and INSTALL_TARGETS commands).


For certain kinds of binary installers (including the graphical installers on Mac OS X and Windows), CPack generates installers that allow users to select individual application components to install. See CPackComponent module for that.


The CPACK_GENERATOR variable has different meanings in different contexts. In your CMakeLists.txt file, CPACK_GENERATOR is a *list of generators*: when run with no other arguments, CPack will iterate over that list and produce one package for each generator. In a CPACK_PROJECT_CONFIG_FILE, though, CPACK_GENERATOR is a *string naming a single generator*. If you need per\-cpack\- generator logic to control *other* cpack settings, then you need a CPACK_PROJECT_CONFIG_FILE.


The CMake source tree itself contains a CPACK_PROJECT_CONFIG_FILE. See the top level file CMakeCPackOptions.cmake.in for an example.


If set, the CPACK_PROJECT_CONFIG_FILE is included automatically on a per\-generator basis. It only need contain overrides.


Here's how it works:


.nf
     CPACK_GENERATOR list variable (unless told to use just a
     specific one via \-G on the command line...)
.fi




.nf
   \- sets CPACK_GENERATOR to the one currently being iterated
   \- includes the CPACK_PROJECT_CONFIG_FILE
   \- produces the package for that generator
.fi




This is the key: For each generator listed in CPACK_GENERATOR in CPackConfig.cmake, cpack will *reset* CPACK_GENERATOR internally to *the one currently being used* and then include the CPACK_PROJECT_CONFIG_FILE.


Before including this CPack module in your CMakeLists.txt file, there are a variety of variables that can be set to customize the resulting installers. The most commonly\-used variables are:


.nf
   CPACK_PACKAGE_NAME \- The name of the package (or application). If
   not specified, defaults to the project name.
.fi




.nf
   CPACK_PACKAGE_VENDOR \- The name of the package vendor (e.g.,
   "Kitware").
.fi




.nf
   CPACK_PACKAGE_VERSION_MAJOR \- Package major Version
.fi




.nf
   CPACK_PACKAGE_VERSION_MINOR \- Package minor Version
.fi




.nf
   CPACK_PACKAGE_VERSION_PATCH \- Package patch Version
.fi




.nf
   CPACK_PACKAGE_DESCRIPTION_FILE \- A text file used to describe the
   project. Used, for example, the introduction screen of a
   CPack\-generated Windows installer to describe the project.
.fi




.nf
   CPACK_PACKAGE_DESCRIPTION_SUMMARY \- Short description of the
   project (only a few words).
.fi




.nf
   CPACK_PACKAGE_FILE_NAME \- The name of the package file to generate,
   not including the extension. For example, cmake\-2.6.1\-Linux\-i686.
.fi




.nf
   CPACK_PACKAGE_INSTALL_DIRECTORY \- Installation directory on the
   target system, e.g., "CMake 2.5".
.fi




.nf
   CPACK_PROJECT_CONFIG_FILE \- File included at cpack time, once per
   generator after setting CPACK_GENERATOR to the actual generator
   being used. Allows per\-generator setting of CPACK_* variables at
   cpack time.
.fi




.nf
   CPACK_RESOURCE_FILE_LICENSE \- License file for the project, which
   will typically be displayed to the user (often with an explicit
   "Accept" button, for graphical installers) prior to installation.
.fi




.nf
   CPACK_RESOURCE_FILE_README \- ReadMe file for the project, which
   typically describes in some detail
.fi




.nf
   CPACK_RESOURCE_FILE_WELCOME \- Welcome file for the project, which
   welcomes users to this installer. Typically used in the graphical
   installers on Windows and Mac OS X.
.fi




.nf
   CPACK_MONOLITHIC_INSTALL \- Disables the component\-based 
   installation mechanism, so that all components are always installed.
.fi




.nf
   CPACK_GENERATOR \- List of CPack generators to use. If not
   specified, CPack will create a set of options (e.g.,
   CPACK_BINARY_NSIS) allowing the user to enable/disable individual
   generators.
.fi




.nf
   CPACK_OUTPUT_CONFIG_FILE \- The name of the CPack configuration file
   for binary installers that will be generated by the CPack
   module. Defaults to CPackConfig.cmake.
.fi




.nf
   CPACK_PACKAGE_EXECUTABLES \- Lists each of the executables along
   with a text label, to be used to create Start Menu shortcuts on
   Windows. For example, setting this to the list ccmake;CMake will
   create a shortcut named "CMake" that will execute the installed
   executable ccmake.
.fi




.nf
   CPACK_STRIP_FILES \- List of files to be stripped. Starting with
   CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which
   enables stripping of all files (a list of files evaluates to TRUE
   in CMake, so this change is compatible).
.fi




The following CPack variables are specific to source packages, and  will not affect binary packages:


.nf
   CPACK_SOURCE_PACKAGE_FILE_NAME \- The name of the source package,
   e.g., cmake\-2.6.1
.fi




.nf
   CPACK_SOURCE_STRIP_FILES \- List of files in the source tree that
   will be stripped. Starting with CMake 2.6.0
   CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables
   stripping of all files (a list of files evaluates to TRUE in CMake,
   so this change is compatible).
.fi




.nf
   CPACK_SOURCE_GENERATOR \- List of generators used for the source
   packages. As with CPACK_GENERATOR, if this is not specified then
   CPack will create a set of options (e.g., CPACK_SOURCE_ZIP)
   allowing users to select which packages will be generated.
.fi




.nf
   CPACK_SOURCE_OUTPUT_CONFIG_FILE \- The name of the CPack
   configuration file for source installers that will be generated by
   the CPack module. Defaults to CPackSourceConfig.cmake.
.fi




.nf
   CPACK_SOURCE_IGNORE_FILES \- Pattern of files in the source tree
   that won't be packaged when building a source package. This is a
   list of patterns, e.g., /CVS/;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;.*~;cscope.*
.fi




The following variables are specific to the DragNDrop installers built on Mac OS X:


.nf
   CPACK_DMG_VOLUME_NAME \- The volume name of the generated disk
   image. Defaults to CPACK_PACKAGE_FILE_NAME.
.fi




.nf
   CPACK_DMG_FORMAT \- The disk image format. Common values are UDRO
   (UDIF read\-only), UDZO (UDIF zlib\-compressed) or UDBZ (UDIF
   bzip2\-compressed). Refer to hdiutil(1) for more information on
   other available formats.
.fi




.nf
   CPACK_DMG_DS_STORE \- Path to a custom .DS_Store file which e.g.
   can be used to specify the Finder window position/geometry and
   layout (such as hidden toolbars, placement of the icons etc.).
   This file has to be generated by the Finder (either manually or
   through OSA\-script) using a normal folder from which the .DS_Store
   file can then be extracted.
.fi




.nf
   CPACK_DMG_BACKGROUND_IMAGE \- Path to an image file which is to be
   used as the background for the Finder Window when the disk image
   is opened.  By default no background image is set. The background
   image is applied after applying the custom .DS_Store file.
.fi




.nf
   CPACK_COMMAND_HDIUTIL \- Path to the hdiutil(1) command used to
   operate on disk image files on Mac OS X. This variable can be used
   to override the automatically detected command (or specify its
   location if the auto\-detection fails to find it.)
.fi




.nf
   CPACK_COMMAND_SETFILE \- Path to the SetFile(1) command used to set
   extended attributes on files and directories on Mac OS X. This
   variable can be used to override the automatically detected
   command (or specify its location if the auto\-detection fails to
   find it.)
.fi




.nf
   CPACK_COMMAND_REZ \- Path to the Rez(1) command used to compile
   resources on Mac OS X. This variable can be used to override the
   automatically detected command (or specify its location if the
   auto\-detection fails to find it.)
.fi




The following variable is specific to installers build on Mac OS X using PackageMaker:


.nf
   CPACK_OSX_PACKAGE_VERSION \- The version of Mac OS X that the
   resulting PackageMaker archive should be compatible
   with. Different versions of Mac OS X support different
   features. For example, CPack can only build component\-based
   installers for Mac OS X 10.4 or newer, and can only build
   installers that download component son\-the\-fly for Mac OS X 10.5
   or newer. If left blank, this value will be set to the minimum
   version of Mac OS X that supports the requested features. Set this
   variable to some value (e.g., 10.4) only if you want to guarantee
   that your installer will work on that version of Mac OS X, and
   don't mind missing extra features available in the installer
   shipping with later versions of Mac OS X.
.fi




The following variables are for advanced uses of CPack:


.nf
   CPACK_CMAKE_GENERATOR \- What CMake generator should be used if the
   project is CMake project. Defaults to the value of CMAKE_GENERATOR;
   few users will want to change this setting.
.fi




.nf
   CPACK_INSTALL_CMAKE_PROJECTS \- List of four values that specify
   what project to install. The four values are: Build directory,
   Project Name, Project Component, Directory. If omitted, CPack will
   build an installer that installers everything.
.fi




.nf
   CPACK_SYSTEM_NAME \- System name, defaults to the value of
   ${CMAKE_SYSTEM_NAME}.
.fi




.nf
   CPACK_PACKAGE_VERSION \- Package full version, used internally. By
   default, this is built from CPACK_PACKAGE_VERSION_MAJOR,
   CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.
.fi




.nf
   CPACK_TOPLEVEL_TAG \- Directory for the installed files.
.fi




.nf
   CPACK_INSTALL_COMMANDS \- Extra commands to install components.
.fi




.nf
   CPACK_INSTALLED_DIRECTORIES \- Extra directories to install.
.fi




.TP
.B CPackBundle
CPack Bundle generator (Mac OS X) specific options




Installers built on Mac OS X using the Bundle generator use the aforementioned DragNDrop variables, plus the following Bundle\-specific parameters:


.nf
   CPACK_BUNDLE_NAME \- The name of the generated bundle.  This
   appears in the OSX finder as the bundle name.  Required.
.fi




.nf
   CPACK_BUNDLE_PLIST \- Path to an OSX plist file that will be used
   as the Info.plist for the generated bundle.  This assumes that
   the caller has generated or specified their own Info.plist file.
   Required.
.fi




.nf
   CPACK_BUNDLE_ICON \- Path to an OSX icns file that will be used as
   the icon for the generated bundle.  This is the icon that appears
   in the OSX finder for the bundle, and in the OSX dock when the
   bundle is opened.  Required.
.fi




.nf
   CPACK_BUNDLE_STARTUP_SCRIPT \- Path to an executable or script that
   will be run whenever an end\-user double\-clicks the generated bundle
   in the OSX Finder.  Optional.
.fi

.TP
.B CPackComponent
Build binary and source package installers




The CPackComponent module is the module which handles the component part of CPack. See CPack module for general information about CPack.


For certain kinds of binary installers (including the graphical installers on Mac OS X and Windows), CPack generates installers that allow users to select individual application components to install. The contents of each of the components are identified by the COMPONENT argument of CMake's INSTALL command. These components can be annotated with user\-friendly names and descriptions, inter\-component dependencies, etc., and grouped in various ways to customize the resulting installer. See the cpack_add_* commands, described below, for more information about component\-specific installations.


Component\-specific installation allows users to select specific sets of components to install during the install process. Installation components are identified by the COMPONENT argument of CMake's INSTALL commands, and should be further described by the following CPack commands:


.nf
   cpack_add_component \- Describes a CPack installation component
   named by the COMPONENT argument to a CMake INSTALL command.
.fi




.nf
     cpack_add_component(compname
                         [DISPLAY_NAME name]
                         [DESCRIPTION description]
                         [HIDDEN | REQUIRED | DISABLED ]
                         [GROUP group]
                         [DEPENDS comp1 comp2 ... ]
                         [INSTALL_TYPES type1 type2 ... ]
                         [DOWNLOADED]
                         [ARCHIVE_FILE filename])
.fi




.nf
   The cmake_add_component command describes an installation
   component, which the user can opt to install or remove as part of
   the graphical installation process. compname is the name of the
   component, as provided to the COMPONENT argument of one or more
   CMake INSTALL commands.
.fi




.nf
   DISPLAY_NAME is the displayed name of the component, used in
   graphical installers to display the component name. This value can
   be any string.
.fi




.nf
   DESCRIPTION is an extended description of the component, used in
   graphical installers to give the user additional information about
   the component. Descriptions can span multiple lines using "\\n" as
   the line separator. Typically, these descriptions should be no
   more than a few lines long.
.fi




.nf
   HIDDEN indicates that this component will be hidden in the
   graphical installer, so that the user cannot directly change
   whether it is installed or not.
.fi




.nf
   REQUIRED indicates that this component is required, and therefore
   will always be installed. It will be visible in the graphical
   installer, but it cannot be unselected. (Typically, required
   components are shown greyed out).
.fi




.nf
   DISABLED indicates that this component should be disabled
   (unselected) by default. The user is free to select this component
   for installation, unless it is also HIDDEN.
.fi




.nf
   DEPENDS lists the components on which this component depends. If
   this component is selected, then each of the components listed
   must also be selected. The dependency information is encoded
   within the installer itself, so that users cannot install
   inconsitent sets of components.
.fi




.nf
   GROUP names the component group of which this component is a
   part. If not provided, the component will be a standalone
   component, not part of any component group. Component groups are
   described with the cpack_add_component_group command, detailed
   below.
.fi




.nf
   INSTALL_TYPES lists the installation types of which this component
   is a part. When one of these installations types is selected, this
   component will automatically be selected. Installation types are
   described with the cpack_add_install_type command, detailed below.
.fi




.nf
   DOWNLOADED indicates that this component should be downloaded
   on\-the\-fly by the installer, rather than packaged in with the
   installer itself. For more information, see the cpack_configure_downloads
   command.
.fi




.nf
   ARCHIVE_FILE provides a name for the archive file created by CPack
   to be used for downloaded components. If not supplied, CPack will
   create a file with some name based on CPACK_PACKAGE_FILE_NAME and
   the name of the component. See cpack_configure_downloads for more
   information.
.fi




.nf
   cpack_add_component_group \- Describes a group of related CPack
   installation components.
.fi




.nf
     cpack_add_component_group(groupname
                              [DISPLAY_NAME name]
                              [DESCRIPTION description]
                              [PARENT_GROUP parent]
                              [EXPANDED]
                              [BOLD_TITLE])
.fi




.nf
   The cpack_add_component_group describes a group of installation
   components, which will be placed together within the listing of
   options. Typically, component groups allow the user to
   select/deselect all of the components within a single group via a
   single group\-level option. Use component groups to reduce the
   complexity of installers with many options. groupname is an
   arbitrary name used to identify the group in the GROUP argument of
   the cpack_add_component command, which is used to place a
   component in a group. The name of the group must not conflict with
   the name of any component.
.fi




.nf
   DISPLAY_NAME is the displayed name of the component group, used in
   graphical installers to display the component group name. This
   value can be any string.
.fi




.nf
   DESCRIPTION is an extended description of the component group,
   used in graphical installers to give the user additional
   information about the components within that group. Descriptions
   can span multiple lines using "\\n" as the line
   separator. Typically, these descriptions should be no more than a
   few lines long.
.fi




.nf
   PARENT_GROUP, if supplied, names the parent group of this group.
   Parent groups are used to establish a hierarchy of groups,
   providing an arbitrary hierarchy of groups.
.fi




.nf
   EXPANDED indicates that, by default, the group should show up as
   "expanded", so that the user immediately sees all of the
   components within the group. Otherwise, the group will initially
   show up as a single entry.
.fi




.nf
   BOLD_TITLE indicates that the group title should appear in bold,
   to call the user's attention to the group.
.fi




.nf
   cpack_add_install_type \- Add a new installation type containing a
   set of predefined component selections to the graphical installer.
.fi




.nf
     cpack_add_install_type(typename
                            [DISPLAY_NAME name])
.fi




.nf
   The cpack_add_install_type command identifies a set of preselected
   components that represents a common use case for an
   application. For example, a "Developer" install type might include
   an application along with its header and library files, while an
   "End user" install type might just include the application's
   executable. Each component identifies itself with one or more
   install types via the INSTALL_TYPES argument to
   cpack_add_component.
.fi




.nf
   DISPLAY_NAME is the displayed name of the install type, which will
   typically show up in a drop\-down box within a graphical
   installer. This value can be any string.
.fi




.nf
   cpack_configure_downloads \- Configure CPack to download selected
   components on\-the\-fly as part of the installation process.
.fi




.nf
     cpack_configure_downloads(site
                               [UPLOAD_DIRECTORY dirname]
                               [ALL]
                               [ADD_REMOVE|NO_ADD_REMOVE])
.fi




.nf
   The cpack_configure_downloads command configures installation\-time
   downloads of selected components. For each downloadable component,
   CPack will create an archive containing the contents of that
   component, which should be uploaded to the given site. When the
   user selects that component for installation, the installer will
   download and extract the component in place. This feature is
   useful for creating small installers that only download the
   requested components, saving bandwidth. Additionally, the
   installers are small enough that they will be installed as part of
   the normal installation process, and the "Change" button in
   Windows Add/Remove Programs control panel will allow one to add or
   remove parts of the application after the original
   installation. On Windows, the downloaded\-components functionality
   requires the ZipDLL plug\-in for NSIS, available at:
.fi




.nf
     http://nsis.sourceforge.net/ZipDLL_plug\-in
.fi




.nf
   On Mac OS X, installers that download components on\-the\-fly can
   only be built and installed on system using Mac OS X 10.5 or
   later.
.fi




.nf
   The site argument is a URL where the archives for downloadable
   components will reside, e.g., http://www.cmake.org/files/2.6.1/installer/
   All of the archives produced by CPack should be uploaded to that location.
.fi




.nf
   UPLOAD_DIRECTORY is the local directory where CPack will create the
   various archives for each of the components. The contents of this
   directory should be uploaded to a location accessible by the URL given
   in the site argument. If omitted, CPack will use the directory
   CPackUploads inside the CMake binary directory to store the generated
   archives.
.fi




.nf
   The ALL flag indicates that all components be downloaded. Otherwise, only
   those components explicitly marked as DOWNLOADED or that have a specified
   ARCHIVE_FILE will be downloaded. Additionally, the ALL option implies
   ADD_REMOVE (unless NO_ADD_REMOVE is specified).
.fi




.nf
   ADD_REMOVE indicates that CPack should install a copy of the installer
   that can be called from Windows' Add/Remove Programs dialog (via the
   "Modify" button) to change the set of installed components. NO_ADD_REMOVE
   turns off this behavior. This option is ignored on Mac OS X.
.fi

.TP
.B CPackDeb
The builtin (binary) CPack Deb generator (Unix only)

CPackDeb may be used to create Deb package using CPack. CPackDeb is a CPack generator thus it uses the CPACK_XXX variables used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration. CPackDeb generator should work on any linux host but it will produce better deb package when Debian specific tools 'dpkg\-xxx' are usable on the build system.


CPackDeb has specific features which are controlled by the specifics CPACK_DEBIAN_XXX variables.You'll find a detailed usage on the wiki:


.nf
  http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
.fi

However as a handy reminder here comes the list of specific variables:


CPACK_DEBIAN_PACKAGE_NAME


.nf
     Mandatory : YES
     Default   : CPACK_PACKAGE_NAME (lower case)
     The debian package summary
.fi

CPACK_DEBIAN_PACKAGE_VERSION


.nf
     Mandatory : YES
     Default   : CPACK_PACKAGE_VERSION
     The debian package version
.fi

CPACK_DEBIAN_PACKAGE_ARCHITECTURE


.nf
     Mandatory : YES
     Default   : Output of dpkg \-\-print\-architecture (or i386 if dpkg is not found)
     The debian package architecture
.fi

CPACK_DEBIAN_PACKAGE_DEPENDS


.nf
     Mandatory : NO
     Default   : \-
     May be used to set deb dependencies.
.fi

CPACK_DEBIAN_PACKAGE_MAINTAINER


.nf
     Mandatory : YES
     Default   : CPACK_PACKAGE_CONTACT
     The debian package maintainer
.fi

CPACK_DEBIAN_PACKAGE_DESCRIPTION


.nf
     Mandatory : YES
     Default   : CPACK_PACKAGE_DESCRIPTION_SUMMARY
     The debian package description
.fi

CPACK_DEBIAN_PACKAGE_SECTION


.nf
     Mandatory : YES
     Default   : 'devel'
     The debian package section
.fi

CPACK_DEBIAN_PACKAGE_PRIORITY


.nf
     Mandatory : YES
     Default   : 'optional'
     The debian package priority
.fi

CPACK_DEBIAN_PACKAGE_HOMEPAGE


.nf
     Mandatory : NO
     Default   : \-
     The URL of the web site for this package
.fi

CPACK_DEBIAN_PACKAGE_SHLIBDEPS


.nf
     Mandatory : NO
     Default   : OFF
     May be set to ON in order to use dpkg\-shlibdeps to generate
     better package dependency list.
     You may need set CMAKE_INSTALL_RPATH toi appropriate value
     if you use this feature, because if you don't dpkg\-shlibdeps
     may fail to find your own shared libs.
     See http://www.cmake.org/Wiki/CMake_RPATH_handling.
.fi

CPACK_DEBIAN_PACKAGE_DEBUG


.nf
     Mandatory : NO
     Default   : \-
     May be set when invoking cpack in order to trace debug information
     during CPackDeb run.
.fi

CPACK_DEBIAN_PACKAGE_PREDEPENDS


.nf
     Mandatory : NO
     Default   : \-
     see http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps
     This field is like Depends, except that it also forces dpkg to complete installation of
     the packages named before even starting the installation of the package which declares
     the pre\-dependency.
.fi

CPACK_DEBIAN_PACKAGE_ENHANCES


.nf
     Mandatory : NO
     Default   : \-
     see http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps
     This field is similar to Suggests but works in the opposite direction.
     It is used to declare that a package can enhance the functionality of another package.
.fi

CPACK_DEBIAN_PACKAGE_BREAKS


.nf
     Mandatory : NO
     Default   : \-
     see http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps
     When one binary package declares that it breaks another, dpkg will refuse to allow the
     package which declares Breaks be installed unless the broken package is deconfigured first,
     and it will refuse to allow the broken package to be reconfigured.
.fi

CPACK_DEBIAN_PACKAGE_CONFLICTS


.nf
     Mandatory : NO
     Default   : \-
     see http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps
     When one binary package declares a conflict with another using a Conflicts field,
     dpkg will refuse to allow them to be installed on the system at the same time.
.fi

CPACK_DEBIAN_PACKAGE_PROVIDES


.nf
     Mandatory : NO
     Default   : \-
     see http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps
     A virtual package is one which appears in the Provides control field of another package.
.fi

CPACK_DEBIAN_PACKAGE_REPLACES


.nf
     Mandatory : NO
     Default   : \-
     see http://www.debian.org/doc/debian\-policy/ch\-relationships.html#s\-binarydeps
     Packages can declare in their control file that they should overwrite
     files in certain other packages, or completely replace other packages.
.fi

.TP
.B CPackNSIS
CPack NSIS generator specific options




The following variables are specific to the graphical installers built on Windows using the Nullsoft Installation System.


.nf
   CPACK_PACKAGE_INSTALL_REGISTRY_KEY \- Registry key used when
   installing this project.
.fi




.nf
   CPACK_NSIS_INSTALL_ROOT \- The default installation directory presented
   to the end user by the NSIS installer is under this root dir. The full
   directory presented to the end user is:
   ${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}
.fi




.nf
   CPACK_NSIS_MUI_ICON \- The icon file (.ico) for the generated
   install program.
.fi




.nf
   CPACK_NSIS_MUI_UNIICON \- The icon file (.ico) for the generated
   uninstall program.
.fi




.nf
   CPACK_PACKAGE_ICON \- A branding image that will be displayed inside
   the installer.
.fi




.nf
   CPACK_NSIS_EXTRA_INSTALL_COMMANDS \- Extra NSIS commands that will
   be added to the install Section.
.fi




.nf
   CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS \- Extra NSIS commands that will
   be added to the uninstall Section.
.fi




.nf
   CPACK_NSIS_COMPRESSOR \- The arguments that will be passed to the
   NSIS SetCompressor command.
.fi




.nf
   CPACK_NSIS_MODIFY_PATH \- If this is set to "ON", then an extra page
   will appear in the installer that will allow the user to choose
   whether the program directory should be added to the system PATH
   variable.
.fi




.nf
   CPACK_NSIS_DISPLAY_NAME \- The display name string that appears in
   the Windows Add/Remove Program control panel
.fi




.nf
   CPACK_NSIS_PACKAGE_NAME \- The title displayed at the top of the
   installer.
.fi




.nf
   CPACK_NSIS_INSTALLED_ICON_NAME \- A path to the executable that
   contains the installer icon.
.fi




.nf
   CPACK_NSIS_HELP_LINK \- URL to a web site providing assistance in
   installing your application.
.fi




.nf
   CPACK_NSIS_URL_INFO_ABOUT \- URL to a web site providing more
   information about your application.
.fi




.nf
   CPACK_NSIS_CONTACT \- Contact information for questions and comments
   about the installation process.
.fi




.nf
   CPACK_NSIS_CREATE_ICONS_EXTRA \- Additional NSIS commands for
   creating start menu shortcuts.
.fi




.nf
   CPACK_NSIS_DELETE_ICONS_EXTRA \-Additional NSIS commands to
   uninstall start menu shortcuts.
.fi




.nf
   CPACK_NSIS_EXECUTABLES_DIRECTORY \- Creating NSIS start menu links
   assumes that they are in 'bin' unless this variable is set.
   For example, you would set this to 'exec' if your executables are
   in an exec directory.
.fi




.nf
   CPACK_NSIS_MUI_FINISHPAGE_RUN \- Specify an executable to add an option
   to run on the finish page of the NSIS installer.
.fi

.TP
.B CPackRPM
The builtin (binary) CPack RPM generator (Unix only)

CPackRPM may be used to create RPM package using CPack. CPackRPM is a CPack generator thus it uses the CPACK_XXX variables used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration


However CPackRPM has specific features which are controlled by the specifics CPACK_RPM_XXX variables. CPackRPM is a component aware generator so when CPACK_RPM_COMPONENT_INSTALL is ON some more CPACK_RPM_<ComponentName>_XXXX variables may be used in order to have component specific values. Note however that <componentName> refers to the **grouping name**. This may be either a component name or a component GROUP name. Usually those vars correspond to RPM spec file entities, one may find information about spec files here http://www.rpm.org/wiki/Docs. You'll find a detailed usage of CPackRPM on the wiki:


.nf
  http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
.fi

However as a handy reminder here comes the list of specific variables:


.nf
  CPACK_RPM_PACKAGE_SUMMARY
     Mandatory : YES
     Default   : CPACK_PACKAGE_DESCRIPTION_SUMMARY
     The RPM package summary
  CPACK_RPM_PACKAGE_NAME
     Mandatory : YES
     Default   : CPACK_PACKAGE_NAME
     The RPM package name
  CPACK_RPM_PACKAGE_VERSION
     Mandatory : YES
     Default   : CPACK_PACKAGE_VERSION
     The RPM package version
  CPACK_RPM_PACKAGE_ARCHITECTURE
     Mandatory : NO
     Default   : \-
     The RPM package architecture. This may be set to "noarch" if you
     know you are building a noarch package.
  CPACK_RPM_PACKAGE_RELEASE
     Mandatory : YES
     Default   : 1
     The RPM package release. This is the numbering of the RPM package
     itself, i.e. the version of the packaging and not the version of the
     content (see CPACK_RPM_PACKAGE_VERSION). One may change the default
     value if the previous packaging was buggy and/or you want to put here
     a fancy Linux distro specific numbering.
  CPACK_RPM_PACKAGE_LICENSE
     Mandatory : YES
     Default   : "unknown"
     The RPM package license policy.
  CPACK_RPM_PACKAGE_GROUP
     Mandatory : YES
     Default   : "unknown"
     The RPM package group.
  CPACK_RPM_PACKAGE_VENDOR
     Mandatory : YES
     Default   : CPACK_PACKAGE_VENDOR if set or "unknown"
     The RPM package vendor.
  CPACK_RPM_PACKAGE_URL
     Mandatory : NO
     Default   : \-
     The projects URL.
  CPACK_RPM_PACKAGE_DESCRIPTION
     Mandatory : YES
     Default   : CPACK_PACKAGE_DESCRIPTION_FILE if set or "no package description available"
  CPACK_RPM_COMPRESSION_TYPE
     Mandatory : NO
     Default   : \-
     May be used to override RPM compression type to be used
     to build the RPM. For example some Linux distribution now default
     to lzma or xz compression whereas older cannot use such RPM.
     Using this one can enforce compression type to be used.
     Possible value are: lzma, xz, bzip2 and gzip.
  CPACK_RPM_PACKAGE_REQUIRES
     Mandatory : NO
     Default   : \-
     May be used to set RPM dependencies (requires).
     Note that you must enclose the complete requires string between quotes,
     for example:
     set(CPACK_RPM_PACKAGE_REQUIRES "python >= 2.5.0, cmake >= 2.8")
     The required package list of an RPM file could be printed with
     rpm \-qp \-\-requires file.rpm
  CPACK_RPM_PACKAGE_SUGGESTS
     Mandatory : NO
     Default   : \-
     May be used to set weak RPM dependencies (suggests).
     Note that you must enclose the complete requires string between quotes.
  CPACK_RPM_PACKAGE_PROVIDES
     Mandatory : NO
     Default   : \-
     May be used to set RPM dependencies (provides).
     The provided package list of an RPM file could be printed with
     rpm \-qp \-\-provides file.rpm
  CPACK_RPM_PACKAGE_OBSOLETES
     Mandatory : NO
     Default   : \-
     May be used to set RPM packages that are obsoleted by this one.
  CPACK_RPM_PACKAGE_RELOCATABLE
     Mandatory : NO
     Default   : CPACK_PACKAGE_RELOCATABLE
     If this variable is set to TRUE or ON CPackRPM will try
     to build a relocatable RPM package. A relocatable RPM may
     be installed using rpm \-\-prefix or \-\-relocate in order to
     install it at an alternate place see rpm(8).
     Note that currently this may fail if CPACK_SET_DESTDIR is set to ON.
     If CPACK_SET_DESTDIR is set then you will get a warning message
     but if there is file installed with absolute path you'll get
     unexpected behavior.
  CPACK_RPM_SPEC_INSTALL_POST [deprecated]
     Mandatory : NO
     Default   : \-
     This way of specifying post\-install script is deprecated use
     CPACK_RPM_POST_INSTALL_SCRIPT_FILE
     May be used to set an RPM post\-install command inside the spec file.
     For example setting it to "/bin/true" may be used to prevent
     rpmbuild to strip binaries.
  CPACK_RPM_SPEC_MORE_DEFINE
     Mandatory : NO
     Default   : \-
     May be used to add any %define lines to the generated spec file.
  CPACK_RPM_PACKAGE_DEBUG
     Mandatory : NO
     Default   : \-
     May be set when invoking cpack in order to trace debug information
     during CPack RPM run. For example you may launch CPack like this
     cpack \-D CPACK_RPM_PACKAGE_DEBUG=1 \-G RPM
  CPACK_RPM_USER_BINARY_SPECFILE
     Mandatory : NO
     Default   : \-
     May be set by the user in order to specify a USER binary spec file
     to be used by CPackRPM instead of generating the file.
     The specified file will be processed by CONFIGURE_FILE( @ONLY).
  CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
     Mandatory : NO
     Default   : \-
     If set CPack will generate a template for USER specified binary
     spec file and stop with an error. For example launch CPack like this
     cpack \-D CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE=1 \-G RPM
     The user may then use this file in order to hand\-craft is own
     binary spec file which may be used with CPACK_RPM_USER_BINARY_SPECFILE.
  CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
  CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
     Mandatory : NO
     Default   : \-
     May be used to embed a pre (un)installation script in the spec file.
     The refered script file(s) will be read and directly
     put after the %pre or %preun section
     If CPACK_RPM_COMPONENT_INSTALL is set to ON the (un)install script for
     each component can be overriden with
     CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE and
     CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE
     One may verify which scriptlet has been included with
      rpm \-qp \-\-scripts  package.rpm
  CPACK_RPM_POST_INSTALL_SCRIPT_FILE
  CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
     Mandatory : NO
     Default   : \-
     May be used to embed a post (un)installation script in the spec file.
     The refered script file(s) will be read and directly
     put after the %post or %postun section
     If CPACK_RPM_COMPONENT_INSTALL is set to ON the (un)install script for
     each component can be overriden with
     CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE and
     CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE
     One may verify which scriptlet has been included with
      rpm \-qp \-\-scripts  package.rpm
  CPACK_RPM_USER_FILELIST
  CPACK_RPM_<COMPONENT>_USER_FILELIST
     Mandatory : NO
     Default   : \-
     May be used to explicitely specify %(<directive>) file line
     in the spec file. Like %config(noreplace) or any other directive
     that be found in the %files section. Since CPackRPM is generating
     the list of files (and directories) the user specified files of
     the CPACK_RPM_<COMPONENT>_USER_FILELIST list will be removed from the generated list.
  CPACK_RPM_CHANGELOG_FILE
     Mandatory : NO
     Default   : \-
     May be used to embed a changelog in the spec file.
     The refered file will be read and directly put after the %changelog
     section.
.fi

.TP
.B CTest
Configure a project for testing with CTest/CDash

Include this module in the top CMakeLists.txt file of a project to enable testing with CTest and dashboard submissions to CDash:


.nf
   project(MyProject)
   ...
   include(CTest)
.fi

The module automatically creates a BUILD_TESTING option that selects whether to enable testing support (ON by default).  After including the module, use code like


.nf
   if(BUILD_TESTING)
     # ... CMake code to create tests ...
   endif()
.fi

to creating tests when testing is enabled.


To enable submissions to a CDash server, create a CTestConfig.cmake file at the top of the project with content such as


.nf
   set(CTEST_PROJECT_NAME "MyProject")
   set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
   set(CTEST_DROP_METHOD "http")
   set(CTEST_DROP_SITE "my.cdash.org")
   set(CTEST_DROP_LOCATION "/submit.php?project=MyProject")
   set(CTEST_DROP_SITE_CDASH TRUE)
.fi

(the CDash server can provide the file to a project administrator who configures 'MyProject'). Settings in the config file are shared by both this CTest module and the CTest command\-line tool's dashboard script mode (ctest \-S).


While building a project for submission to CDash, CTest scans the build output for errors and warnings and reports them with surrounding context from the build log.  This generic approach works for all build tools, but does not give details about the command invocation that produced a given problem.  One may get more detailed reports by adding


.nf
   set(CTEST_USE_LAUNCHERS 1)
.fi

to the CTestConfig.cmake file.  When this option is enabled, the CTest module tells CMake's Makefile generators to invoke every command in the generated build system through a CTest launcher program.  (Currently the CTEST_USE_LAUNCHERS option is ignored on non\-Makefile generators.)  During a manual build each launcher transparently runs the command it wraps.  During a CTest\-driven build for submission to CDash each launcher reports detailed information when its command fails or warns. (Setting CTEST_USE_LAUNCHERS in CTestConfig.cmake is convenient, but also adds the launcher overhead even for manual builds.  One may instead set it in a CTest dashboard script and add it to the CMake cache for the build tree.)

.TP
.B CTestScriptMode
.nf
 
.fi

This file is read by ctest in script mode (\-S)

.TP
.B CheckCCompilerFlag
Check whether the C compiler supports a given flag.

CHECK_C_COMPILER_FLAG(<flag> <var>)


.nf
  <flag> \- the compiler flag
  <var>  \- variable to store the result
.fi

This internally calls the check_c_source_compiles macro. See help for CheckCSourceCompiles for a listing of variables that can modify the build.

.TP
.B CheckCSourceCompiles
Check if given C source compiles and links into an executable

CHECK_C_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail\-regex>])


.nf
  <code>       \- source code to try to compile, must define 'main'
  <var>        \- variable to store whether the source code compiled
  <fail\-regex> \- fail if test output matches this regex
.fi

The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B CheckCSourceRuns
Check if the given C source code compiles and runs.

CHECK_C_SOURCE_RUNS(<code> <var>)


.nf
  <code>   \- source code to try to compile
  <var>    \- variable to store the result
             (1 for success, empty for failure)
.fi

The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B CheckCXXCompilerFlag
Check whether the CXX compiler supports a given flag.

CHECK_CXX_COMPILER_FLAG(<flag> <var>)


.nf
  <flag> \- the compiler flag
  <var>  \- variable to store the result
.fi

This internally calls the check_cxx_source_compiles macro.  See help for CheckCXXSourceCompiles for a listing of variables that can modify the build.

.TP
.B CheckCXXSourceCompiles
Check if given C++ source compiles and links into an executable

CHECK_CXX_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail\-regex>])


.nf
  <code>       \- source code to try to compile, must define 'main'
  <var>        \- variable to store whether the source code compiled
  <fail\-regex> \- fail if test output matches this regex
.fi

The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B CheckCXXSourceRuns
Check if the given C++ source code compiles and runs.

CHECK_CXX_SOURCE_RUNS(<code> <var>)


.nf
  <code>   \- source code to try to compile
  <var>    \- variable to store the result
             (1 for success, empty for failure)
.fi

The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B CheckCXXSymbolExists
Check if a symbol exists as a function, variable, or macro in C++

CHECK_CXX_SYMBOL_EXISTS(<symbol> <files> <variable>)


Check that the <symbol> is available after including given header <files> and store the result in a <variable>.  Specify the list of files in one argument as a semicolon\-separated list. CHECK_CXX_SYMBOL_EXISTS() can be used to check in C++ files, as opposed to CHECK_SYMBOL_EXISTS(), which works only for C.


If the header files define the symbol as a macro it is considered available and assumed to work.  If the header files declare the symbol as a function or variable then the symbol must also be available for linking.  If the symbol is a type or enum value it will not be recognized (consider using CheckTypeSize or CheckCSourceCompiles).


The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B CheckFortranFunctionExists
macro which checks if the Fortran function exists

CHECK_FORTRAN_FUNCTION_EXISTS(FUNCTION VARIABLE)


.nf
  FUNCTION \- the name of the Fortran function
  VARIABLE \- variable to store the result
.fi




The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B CheckFunctionExists
Check if a C function can be linked

CHECK_FUNCTION_EXISTS(<function> <variable>)


Check that the <function> is provided by libraries on the system and store the result in a <variable>.  This does not verify that any system header file declares the function, only that it can be found at link time (considure using CheckSymbolExists).


The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B CheckIncludeFile
macro which checks the include file exists.

CHECK_INCLUDE_FILE(INCLUDE VARIABLE)


.nf
  INCLUDE  \- name of include file
  VARIABLE \- variable to return result
   
.fi

an optional third argument is the CFlags to add to the compile line  or you can use CMAKE_REQUIRED_FLAGS


The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
.fi




.TP
.B CheckIncludeFileCXX
Check if the include file exists.

.nf
  CHECK_INCLUDE_FILE_CXX(INCLUDE VARIABLE)
.fi




.nf
  INCLUDE  \- name of include file
  VARIABLE \- variable to return result
  
.fi

An optional third argument is the CFlags to add to the compile line  or you can use CMAKE_REQUIRED_FLAGS.


The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
.fi




.TP
.B CheckIncludeFiles
Check if the files can be included




CHECK_INCLUDE_FILES(INCLUDE VARIABLE)


.nf
  INCLUDE  \- list of files to include
  VARIABLE \- variable to return result
.fi




The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
.fi

.TP
.B CheckLibraryExists
Check if the function exists.

CHECK_LIBRARY_EXISTS (LIBRARY FUNCTION LOCATION VARIABLE)


.nf
  LIBRARY  \- the name of the library you are looking for
  FUNCTION \- the name of the function
  LOCATION \- location where the library should be found
  VARIABLE \- variable to store the result
.fi




The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B CheckPrototypeDefinition
Check if the protoype we expect is correct.

check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)


.nf
  FUNCTION \- The name of the function (used to check if prototype exists)
  PROTOTYPE\- The prototype to check.
  RETURN \- The return value of the function.
  HEADER \- The header files required.
  VARIABLE \- The variable to store the result.
.fi

Example:


.nf
  check_prototype_definition(getpwent_r
   "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
   "NULL"
   "unistd.h;pwd.h"
   SOLARIS_GETPWENT_R)
.fi

The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B CheckStructHasMember
Check if the given struct or class has the specified member variable

CHECK_STRUCT_HAS_MEMBER (STRUCT MEMBER HEADER VARIABLE)


.nf
  STRUCT \- the name of the struct or class you are interested in
  MEMBER \- the member which existence you want to check
  HEADER \- the header(s) where the prototype should be declared
  VARIABLE \- variable to store the result
.fi




The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
.fi




Example: CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC)

.TP
.B CheckSymbolExists
Check if a symbol exists as a function, variable, or macro

CHECK_SYMBOL_EXISTS(<symbol> <files> <variable>)


Check that the <symbol> is available after including given header <files> and store the result in a <variable>.  Specify the list of files in one argument as a semicolon\-separated list.


If the header files define the symbol as a macro it is considered available and assumed to work.  If the header files declare the symbol as a function or variable then the symbol must also be available for linking.  If the symbol is a type or enum value it will not be recognized (consider using CheckTypeSize or CheckCSourceCompiles). If the check needs to be done in C++, consider using CHECK_CXX_SYMBOL_EXISTS(), which does the same as CHECK_SYMBOL_EXISTS(), but in C++.


The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B CheckTypeSize
Check sizeof a type

.nf
  CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY])
.fi

Check if the type exists and determine its size. On return, "HAVE_${VARIABLE}" holds the existence of the type, and "${VARIABLE}" holds one of the following:


.nf
   <size> = type has non\-zero size <size>
   "0"    = type has arch\-dependent size (see below)
   ""     = type does not exist
.fi

Furthermore, the variable "${VARIABLE}_CODE" holds C preprocessor code to define the macro "${VARIABLE}" to the size of the type, or leave the macro undefined if the type does not exist.


The variable "${VARIABLE}" may be "0" when CMAKE_OSX_ARCHITECTURES has multiple architectures for building OS X universal binaries. This indicates that the type size varies across architectures. In this case "${VARIABLE}_CODE" contains C preprocessor tests mapping from each architecture macro to the corresponding type size. The list of architecture macros is stored in "${VARIABLE}_KEYS", and the value for each key is stored in "${VARIABLE}\-${KEY}".


If the BUILTIN_TYPES_ONLY option is not given, the macro checks for headers <sys/types.h>, <stdint.h>, and <stddef.h>, and saves results in HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H.  The type size check automatically includes the available headers, thus supporting checks of types defined in the headers.


The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_INCLUDES = list of include directories
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
  CMAKE_EXTRA_INCLUDE_FILES = list of extra headers to include
.fi

.TP
.B CheckVariableExists
Check if the variable exists.

.nf
  CHECK_VARIABLE_EXISTS(VAR VARIABLE)
  
  VAR      \- the name of the variable
  VARIABLE \- variable to store the result
.fi




This macro is only for C variables.


The following variables may be set before calling this macro to modify the way the check is run:


.nf
  CMAKE_REQUIRED_FLAGS = string of compile command line flags
  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (\-DFOO=bar)
  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
.fi

.TP
.B Dart
Configure a project for testing with CTest or old Dart Tcl Client

This file is the backwards\-compatibility version of the CTest module. It supports using the old Dart 1 Tcl client for driving dashboard submissions as well as testing with CTest.  This module should be included in the CMakeLists.txt file at the top of a project.  Typical usage:


.nf
  INCLUDE(Dart)
  IF(BUILD_TESTING)
    # ... testing related CMake code ...
  ENDIF(BUILD_TESTING)
.fi

The BUILD_TESTING option is created by the Dart module to determine whether testing support should be enabled.  The default is ON.

.TP
.B DeployQt4
Functions to help assemble a standalone Qt4 executable.

A collection of CMake utility functions useful for deploying Qt4 executables.


The following functions are provided by this module:


.nf
   write_qt4_conf
   resolve_qt4_paths
   fixup_qt4_executable
   install_qt4_plugin_path
   install_qt4_plugin
   install_qt4_executable
.fi

Requires CMake 2.6 or greater because it uses function and PARENT_SCOPE. Also depends on BundleUtilities.cmake.


.nf
  WRITE_QT4_CONF(<qt_conf_dir> <qt_conf_contents>)
.fi

Writes a qt.conf file with the <qt_conf_contents> into <qt_conf_dir>.


.nf
  RESOLVE_QT4_PATHS(<paths_var> [<executable_path>])
.fi

Loop through <paths_var> list and if any don't exist resolve them relative to the <executable_path> (if supplied) or the CMAKE_INSTALL_PREFIX.


.nf
  FIXUP_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
.fi

Copies Qt plugins, writes a Qt configuration file (if needed) and fixes up a Qt4 executable using BundleUtilities so it is standalone and can be drag\-and\-drop copied to another machine as long as all of the system libraries are compatible.


<executable> should point to the executable to be fixed\-up.


<qtplugins> should contain a list of the names or paths of any Qt plugins to be installed.


<libs> will be passed to BundleUtilities and should be a list of any already installed plugins, libraries or executables to also be fixed\-up.


<dirs> will be passed to BundleUtilities and should contain and directories to be searched to find library dependencies.


<plugins_dir> allows an custom plugins directory to be used.


<request_qt_conf> will force a qt.conf file to be written even if not needed.


.nf
  INSTALL_QT4_PLUGIN_PATH(plugin executable copy installed_plugin_path_var <plugins_dir> <component> <configurations>)
.fi

Install (or copy) a resolved <plugin> to the default plugins directory (or <plugins_dir>) relative to <executable> and store the result in <installed_plugin_path_var>.


If <copy> is set to TRUE then the plugins will be copied rather than installed. This is to allow this module to be used at CMake time rather than install time.


If <component> is set then anything installed will use this COMPONENT.


.nf
  INSTALL_QT4_PLUGIN(plugin executable copy installed_plugin_path_var <plugins_dir> <component>)
.fi

Install (or copy) an unresolved <plugin> to the default plugins directory (or <plugins_dir>) relative to <executable> and store the result in <installed_plugin_path_var>. See documentation of INSTALL_QT4_PLUGIN_PATH.


.nf
  INSTALL_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>])
.fi

Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up a Qt4 executable using BundleUtilities so it is standalone and can be drag\-and\-drop copied to another machine as long as all of the system libraries are compatible. The executable will be fixed\-up at install time. <component> is the COMPONENT used for bundle fixup and plugin installation. See documentation of FIXUP_QT4_BUNDLE.

.TP
.B Documentation
DocumentationVTK.cmake

This file provides support for the VTK documentation framework. It relies on several tools (Doxygen, Perl, etc).

.TP
.B ExternalProject
Create custom targets to build projects in external trees

The 'ExternalProject_Add' function creates a custom target to drive download, update/patch, configure, build, install and test steps of an external project:


.nf
  ExternalProject_Add(<name>    # Name for custom target
    [DEPENDS projects...]       # Targets on which the project depends
    [PREFIX dir]                # Root dir for entire project
    [LIST_SEPARATOR sep]        # Sep to be replaced by ; in cmd lines
    [TMP_DIR dir]               # Directory to store temporary files
    [STAMP_DIR dir]             # Directory to store step timestamps
   #\-\-Download step\-\-\-\-\-\-\-\-\-\-\-\-\-\-
    [DOWNLOAD_DIR dir]          # Directory to store downloaded files
    [DOWNLOAD_COMMAND cmd...]   # Command to download source tree
    [CVS_REPOSITORY cvsroot]    # CVSROOT of CVS repository
    [CVS_MODULE mod]            # Module to checkout from CVS repo
    [CVS_TAG tag]               # Tag to checkout from CVS repo
    [SVN_REPOSITORY url]        # URL of Subversion repo
    [SVN_REVISION rev]          # Revision to checkout from Subversion repo
    [SVN_USERNAME john ]        # Username for Subversion checkout and update
    [SVN_PASSWORD doe ]         # Password for Subversion checkout and update
    [SVN_TRUST_CERT 1 ]         # Trust the Subversion server site certificate
    [GIT_REPOSITORY url]        # URL of git repo
    [GIT_TAG tag]               # Git branch name, commit id or tag
    [URL /.../src.tgz]          # Full path or URL of source
    [URL_MD5 md5]               # MD5 checksum of file at URL
    [TIMEOUT seconds]           # Time allowed for file download operations
   #\-\-Update/Patch step\-\-\-\-\-\-\-\-\-\-
    [UPDATE_COMMAND cmd...]     # Source work\-tree update command
    [PATCH_COMMAND cmd...]      # Command to patch downloaded source
   #\-\-Configure step\-\-\-\-\-\-\-\-\-\-\-\-\-
    [SOURCE_DIR dir]            # Source dir to be used for build
    [CONFIGURE_COMMAND cmd...]  # Build tree configuration command
    [CMAKE_COMMAND /.../cmake]  # Specify alternative cmake executable
    [CMAKE_GENERATOR gen]       # Specify generator for native build
    [CMAKE_ARGS args...]        # Arguments to CMake command line
    [CMAKE_CACHE_ARGS args...]  # Initial cache arguments, of the form \-Dvar:string=on
   #\-\-Build step\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
    [BINARY_DIR dir]            # Specify build dir location
    [BUILD_COMMAND cmd...]      # Command to drive the native build
    [BUILD_IN_SOURCE 1]         # Use source dir for build dir
   #\-\-Install step\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
    [INSTALL_DIR dir]           # Installation prefix
    [INSTALL_COMMAND cmd...]    # Command to drive install after build
   #\-\-Test step\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
    [TEST_BEFORE_INSTALL 1]     # Add test step executed before install step
    [TEST_AFTER_INSTALL 1]      # Add test step executed after install step
    [TEST_COMMAND cmd...]       # Command to drive test
   #\-\-Output logging\-\-\-\-\-\-\-\-\-\-\-\-\-
    [LOG_DOWNLOAD 1]            # Wrap download in script to log output
    [LOG_UPDATE 1]              # Wrap update in script to log output
    [LOG_CONFIGURE 1]           # Wrap configure in script to log output
    [LOG_BUILD 1]               # Wrap build in script to log output
    [LOG_TEST 1]                # Wrap test in script to log output
    [LOG_INSTALL 1]             # Wrap install in script to log output
   #\-\-Custom targets\-\-\-\-\-\-\-\-\-\-\-\-\-
    [STEP_TARGETS st1 st2 ...]  # Generate custom targets for these steps
    )
.fi

The *_DIR options specify directories for the project, with default directories computed as follows. If the PREFIX option is given to ExternalProject_Add() or the EP_PREFIX directory property is set, then an external project is built and installed under the specified prefix:


.nf
   TMP_DIR      = <prefix>/tmp
   STAMP_DIR    = <prefix>/src/<name>\-stamp
   DOWNLOAD_DIR = <prefix>/src
   SOURCE_DIR   = <prefix>/src/<name>
   BINARY_DIR   = <prefix>/src/<name>\-build
   INSTALL_DIR  = <prefix>
.fi

Otherwise, if the EP_BASE directory property is set then components of an external project are stored under the specified base:


.nf
   TMP_DIR      = <base>/tmp/<name>
   STAMP_DIR    = <base>/Stamp/<name>
   DOWNLOAD_DIR = <base>/Download/<name>
   SOURCE_DIR   = <base>/Source/<name>
   BINARY_DIR   = <base>/Build/<name>
   INSTALL_DIR  = <base>/Install/<name>
.fi

If no PREFIX, EP_PREFIX, or EP_BASE is specified then the default is to set PREFIX to "<name>\-prefix". Relative paths are interpreted with respect to the build directory corresponding to the source directory in which ExternalProject_Add is invoked.


If SOURCE_DIR is explicitly set to an existing directory the project will be built from it. Otherwise a download step must be specified using one of the DOWNLOAD_COMMAND, CVS_*, SVN_*, or URL options. The URL option may refer locally to a directory or source tarball, or refer to a remote tarball (e.g. http://.../src.tgz).


The 'ExternalProject_Add_Step' function adds a custom step to an external project:


.nf
  ExternalProject_Add_Step(<name> <step> # Names of project and custom step
    [COMMAND cmd...]        # Command line invoked by this step
    [COMMENT "text..."]     # Text printed when step executes
    [DEPENDEES steps...]    # Steps on which this step depends
    [DEPENDERS steps...]    # Steps that depend on this step
    [DEPENDS files...]      # Files on which this step depends
    [ALWAYS 1]              # No stamp file, step always runs
    [WORKING_DIRECTORY dir] # Working directory for command
    [LOG 1]                 # Wrap step in script to log output
    )
.fi

The command line, comment, and working directory of every standard and custom step is processed to replace tokens <SOURCE_DIR>, <BINARY_DIR>, <INSTALL_DIR>, and <TMP_DIR> with corresponding property values.


The 'ExternalProject_Get_Property' function retrieves external project target properties:


.nf
  ExternalProject_Get_Property(<name> [prop1 [prop2 [...]]])
.fi

It stores property values in variables of the same name. Property names correspond to the keyword argument names of 'ExternalProject_Add'.


The 'ExternalProject_Add_StepTargets' function generates custom targets for the steps listed:


.nf
  ExternalProject_Add_StepTargets(<name> [step1 [step2 [...]]])
.fi




If STEP_TARGETS is set then ExternalProject_Add_StepTargets is automatically called at the end of matching calls to ExternalProject_Add_Step. Pass STEP_TARGETS explicitly to individual ExternalProject_Add calls, or implicitly to all ExternalProject_Add calls by setting the directory property EP_STEP_TARGETS.


If STEP_TARGETS is not set, clients may still manually call ExternalProject_Add_StepTargets after calling ExternalProject_Add or ExternalProject_Add_Step.


This functionality is provided to make it easy to drive the steps independently of each other by specifying targets on build command lines. For example, you may be submitting to a sub\-project based dashboard, where you want to drive the configure portion of the build, then submit to the dashboard, followed by the build portion, followed by tests. If you invoke a custom target that depends on a step halfway through the step dependency chain, then all the previous steps will also run to ensure everything is up to date.


For example, to drive configure, build and test steps independently for each ExternalProject_Add call in your project, write the following line prior to any ExternalProject_Add calls in your CMakeLists file:


.nf
   set_property(DIRECTORY PROPERTY EP_STEP_TARGETS configure build test)
.fi

.TP
.B FeatureSummary
Macros for generating a summary of enabled/disabled features




This module provides the macros feature_summary(), set_package_properties() and add_feature_info(). For compatibility it also still provides set_package_info(), set_feature_info(), print_enabled_features() and print_disabled_features().


These macros can be used to generate a summary of enabled and disabled packages and/or feature for a build tree:


.nf
    \-\- The following OPTIONAL packages have been found:
    LibXml2 (required version >= 2.4) , XML processing library. , <http://xmlsoft.org>
       * Enables HTML\-import in MyWordProcessor
       * Enables odt\-export in MyWordProcessor
    PNG , A PNG image library. , <http://www.libpng.org/pub/png/>
       * Enables saving screenshots
    \-\- The following OPTIONAL packages have not been found:
    Lua51 , The Lua scripting language. , <http://www.lua.org>
       * Enables macros in MyWordProcessor
    Foo , Foo provides cool stuff.
.fi







.nf
    FEATURE_SUMMARY( [FILENAME <file>]
                     [APPEND]
                     [VAR <variable_name>]
                     [INCLUDE_QUIET_PACKAGES]
                     [FATAL_ON_MISSING_REQUIRED_PACKAGES]
                     [DESCRIPTION "Found packages:"]
                     WHAT (ALL | PACKAGES_FOUND | PACKAGES_NOT_FOUND
                          | ENABLED_FEATURES | DISABLED_FEATURES]
                   )
.fi




The FEATURE_SUMMARY() macro can be used to print information about enabled or disabled packages or features of a project. By default, only the names of the features/packages will be printed and their required version when one was specified. Use SET_PACKAGE_PROPERTIES() to add more useful information, like e.g. a download URL for the respective package or their purpose in the project.


The WHAT option is the only mandatory option. Here you specify what information will be printed:


.nf
    ALL: print everything
    ENABLED_FEATURES: the list of all features which are enabled
    DISABLED_FEATURES: the list of all features which are disabled
    PACKAGES_FOUND: the list of all packages which have been found
    PACKAGES_NOT_FOUND: the list of all packages which have not been found
    OPTIONAL_PACKAGES_FOUND: only those packages which have been found which have the type OPTIONAL
    OPTIONAL_PACKAGES_NOT_FOUND: only those packages which have not been found which have the type OPTIONAL
    RECOMMENDED_PACKAGES_FOUND: only those packages which have been found which have the type RECOMMENDED
    RECOMMENDED_PACKAGES_NOT_FOUND: only those packages which have not been found which have the type RECOMMENDED
    REQUIRED_PACKAGES_FOUND: only those packages which have been found which have the type REQUIRED
    REQUIRED_PACKAGES_NOT_FOUND: only those packages which have not been found which have the type REQUIRED
    RUNTIME_PACKAGES_FOUND: only those packages which have been found which have the type RUNTIME
    RUNTIME_PACKAGES_NOT_FOUND: only those packages which have not been found which have the type RUNTIME
.fi




If a FILENAME is given, the information is printed into this file. If APPEND is used, it is appended to this file, otherwise the file is overwritten if it already existed. If the VAR option is used, the information is "printed" into the specified variable. If FILENAME is not used, the information is printed to the terminal. Using the DESCRIPTION option a description or headline can be set which will be printed above the actual content. If INCLUDE_QUIET_PACKAGES is given, packages which have been searched with find_package(... QUIET) will also be listed. By default they are skipped. If FATAL_ON_MISSING_REQUIRED_PACKAGES is given, CMake will abort if a package which is marked as REQUIRED has not been found.


Example 1, append everything to a file:


.nf
   feature_summary(WHAT ALL
                   FILENAME ${CMAKE_BINARY_DIR}/all.log APPEND)
.fi




Example 2, print the enabled features into the variable enabledFeaturesText, including QUIET packages:


.nf
   feature_summary(WHAT ENABLED_FEATURES
                   INCLUDE_QUIET_PACKAGES
                   DESCRIPTION "Enabled Features:"
                   VAR enabledFeaturesText)
   message(STATUS "${enabledFeaturesText}")
.fi







.nf
    SET_PACKAGE_PROPERTIES(<name> PROPERTIES [ URL <url> ]
                                             [ DESCRIPTION <description> ]
                                             [ TYPE (RUNTIME|OPTIONAL|RECOMMENDED|REQUIRED) ]
                                             [ PURPOSE <purpose> ]
                          )
.fi




Use this macro to set up information about the named package, which can then be displayed via FEATURE_SUMMARY(). This can be done either directly in the Find\-module or in the project which uses the module after the FIND_PACKAGE() call. The features for which information can be set are added automatically by the find_package() command.


URL: this should be the homepage of the package, or something similar. Ideally this is set already directly in the Find\-module.


DESCRIPTION: A short description what that package is, at most one sentence. Ideally this is set already directly in the Find\-module.


TYPE: What type of dependency has the using project on that package. Default is OPTIONAL. In this case it is a package which can be used by the project when available at buildtime, but it also work without. RECOMMENDED is similar to OPTIONAL, i.e. the project will build if the package is not present, but the functionality of the resulting binaries will be severly limited. If a REQUIRED package is not available at buildtime, the project may not even build. This can be combined with the FATAL_ON_MISSING_REQUIRED_PACKAGES argument for feature_summary(). Last, a RUNTIME package is a package which is actually not used at all during the build, but which is required for actually running the resulting binaries. So if such a package is missing, the project can still be built, but it may not work later on. If set_package_properties() is called multiple times for the same package with different TYPEs, the TYPE is only changed to higher TYPEs ( RUNTIME < OPTIONAL < RECOMMENDED < REQUIRED ), lower TYPEs are ignored. The TYPE property is project\-specific, so it cannot be set by the Find\-module, but must be set in the project.


PURPOSE: This describes which features this package enables in the project, i.e. it tells the user what functionality he gets in the resulting binaries. If set_package_properties() is called multiple times for a package, all PURPOSE properties are appended to a list of purposes of the package in the project. As the TYPE property, also the PURPOSE property is project\-specific, so it cannot be set by the Find\-module, but must be set in the project.





Example for setting the info for a package:


.nf
   find_package(LibXml2)
   set_package_properties(LibXml2 PROPERTIES DESCRIPTION "A XML processing library."
                                             URL "http://xmlsoft.org/")
.fi




.nf
   set_package_properties(LibXml2 PROPERTIES TYPE RECOMMENDED
                                             PURPOSE "Enables HTML\-import in MyWordProcessor")
.fi

...


.nf
   set_package_properties(LibXml2 PROPERTIES TYPE OPTIONAL
                                             PURPOSE "Enables odt\-export in MyWordProcessor")
.fi




.nf
   find_package(DBUS)
   set_package_properties(DBUS PROPERTIES TYPE RUNTIME
                                             PURPOSE "Necessary to disable the screensaver during a presentation" )
.fi




.nf
    ADD_FEATURE_INFO(<name> <enabled> <description>)
.fi

Use this macro to add information about a feature with the given <name>. <enabled> contains whether this feature is enabled or not, <description> is a text describing the feature. The information can be displayed using feature_summary() for ENABLED_FEATURES and DISABLED_FEATURES respectively.


Example for setting the info for a feature:


.nf
   option(WITH_FOO "Help for foo" ON)
   add_feature_info(Foo WITH_FOO "The Foo feature provides very cool stuff.")
.fi







The following macros are provided for compatibility with previous CMake versions:


.nf
    SET_PACKAGE_INFO(<name> <description> [<url> [<purpose>] ] )
.fi

Use this macro to set up information about the named package, which can then be displayed via FEATURE_SUMMARY(). This can be done either directly in the Find\-module or in the project which uses the module after the FIND_PACKAGE() call. The features for which information can be set are added automatically by the find_package() command.


.nf
    PRINT_ENABLED_FEATURES()
.fi

Does the same as FEATURE_SUMMARY(WHAT ENABLED_FEATURES  DESCRIPTION "Enabled features:")


.nf
    PRINT_DISABLED_FEATURES()
.fi

Does the same as FEATURE_SUMMARY(WHAT DISABLED_FEATURES  DESCRIPTION "Disabled features:")


.nf
    SET_FEATURE_INFO(<name> <description> [<url>] )
.fi

Does the same as SET_PACKAGE_INFO(<name> <description> <url> )

.TP
.B FindALSA
Find alsa

Find the alsa libraries (asound)


.nf
  This module defines the following variables:
     ALSA_FOUND       \- True if ALSA_INCLUDE_DIR & ALSA_LIBRARY are found
     ALSA_LIBRARIES   \- Set when ALSA_LIBRARY is found
     ALSA_INCLUDE_DIRS \- Set when ALSA_INCLUDE_DIR is found
.fi




.nf
     ALSA_INCLUDE_DIR \- where to find asoundlib.h, etc.
     ALSA_LIBRARY     \- the asound library
.fi




.TP
.B FindASPELL
Try to find ASPELL

Once done this will define


.nf
  ASPELL_FOUND \- system has ASPELL
  ASPELL_EXECUTABLE \- the ASPELL executable
  ASPELL_INCLUDE_DIR \- the ASPELL include directory
  ASPELL_LIBRARIES \- The libraries needed to use ASPELL
  ASPELL_DEFINITIONS \- Compiler switches required for using ASPELL
.fi

.TP
.B FindAVIFile
Locate AVIFILE library and include paths

AVIFILE (http://avifile.sourceforge.net/)is a set of libraries for  i386 machines to use various AVI codecs. Support is limited beyond Linux. Windows provides native AVI support, and so doesn't need this library. This module defines


.nf
  AVIFILE_INCLUDE_DIR, where to find avifile.h , etc.
  AVIFILE_LIBRARIES, the libraries to link against
  AVIFILE_DEFINITIONS, definitions to use when compiling
  AVIFILE_FOUND, If false, don't try to use AVIFILE
.fi

.TP
.B FindArmadillo
Find Armadillo

Find the Armadillo C++ library


Using Armadillo:


.nf
  find_package(Armadillo REQUIRED)
  include_directories(${ARMADILLO_INCLUDE_DIRS})
  add_executable(foo foo.cc)
  target_link_libraries(foo ${ARMADILLO_LIBRARIES})
.fi

This module sets the following variables:


.nf
  ARMADILLO_FOUND \- set to true if the library is found
  ARMADILLO_INCLUDE_DIRS \- list of required include directories
  ARMADILLO_LIBRARIES \- list of libraries to be linked
  ARMADILLO_VERSION_MAJOR \- major version number
  ARMADILLO_VERSION_MINOR \- minor version number
  ARMADILLO_VERSION_PATCH \- patch version number
  ARMADILLO_VERSION_STRING \- version number as a string (ex: "1.0.4")
  ARMADILLO_VERSION_NAME \- name of the version (ex: "Antipodean Antileech")
.fi

.TP
.B FindBISON
Find bison executable and provides macros to generate custom build rules

The module defines the following variables:


.nf
  BISON_EXECUTABLE \- path to the bison program
  BISON_VERSION \- version of bison
  BISON_FOUND \- true if the program was found
.fi




The minimum required version of bison can be specified using the standard CMake syntax, e.g. find_package(BISON 2.1.3)


If bison is found, the module defines the macros:


.nf
  BISON_TARGET(<Name> <YaccInput> <CodeOutput> [VERBOSE <file>]
              [COMPILE_FLAGS <string>])
.fi

which will create  a custom rule to generate  a parser. <YaccInput> is the path to  a yacc file. <CodeOutput> is the name  of the source file generated by bison.  A header file is also  be generated, and contains the  token  list.  If  COMPILE_FLAGS  option is  specified,  the  next parameter is  added in the bison  command line.  if  VERBOSE option is specified, <file> is created  and contains verbose descriptions of the grammar and parser. The macro defines a set of variables:


.nf
  BISON_${Name}_DEFINED \- true is the macro ran successfully
  BISON_${Name}_INPUT \- The input source file, an alias for <YaccInput>
  BISON_${Name}_OUTPUT_SOURCE \- The source file generated by bison
  BISON_${Name}_OUTPUT_HEADER \- The header file generated by bison
  BISON_${Name}_OUTPUTS \- The sources files generated by bison
  BISON_${Name}_COMPILE_FLAGS \- Options used in the bison command line
.fi




.nf
  ====================================================================
  Example:
.fi




.nf
   find_package(BISON)
   BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
   add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
  ====================================================================
.fi

.TP
.B FindBLAS
Find BLAS library

This module finds an installed fortran library that implements the BLAS linear\-algebra interface (see http://www.netlib.org/blas/). The list of libraries searched for is taken from the autoconf macro file, acx_blas.m4 (distributed at http://ac\-archive.sourceforge.net/ac\-archive/acx_blas.html).


This module sets the following variables:


.nf
  BLAS_FOUND \- set to true if a library implementing the BLAS interface
    is found
  BLAS_LINKER_FLAGS \- uncached list of required linker flags (excluding \-l
    and \-L).
  BLAS_LIBRARIES \- uncached list of libraries (using full path name) to
    link against to use BLAS
  BLAS95_LIBRARIES \- uncached list of libraries (using full path name)
    to link against to use BLAS95 interface
  BLAS95_FOUND \- set to true if a library implementing the BLAS f95 interface
    is found
  BLA_STATIC  if set on this determines what kind of linkage we do (static)
  BLA_VENDOR  if set checks only the specified vendor, if not set checks
     all the possibilities
  BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK
.fi

######### ## List of vendors (BLA_VENDOR) valid in this module #  Goto,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model), #  Intel( older versions of mkl 32 and 64 bit), ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic C/CXX should be enabled to use Intel mkl

.TP
.B FindBZip2
Try to find BZip2

Once done this will define


.nf
  BZIP2_FOUND \- system has BZip2
  BZIP2_INCLUDE_DIR \- the BZip2 include directory
  BZIP2_LIBRARIES \- Link these to use BZip2
  BZIP2_NEED_PREFIX \- this is set if the functions are prefixed with BZ2_
.fi

.TP
.B FindBoost
Try to find Boost include dirs and libraries

Usage of this module as follows:


NOTE: Take note of the Boost_ADDITIONAL_VERSIONS variable below. Due to Boost naming conventions and limitations in CMake this find module is NOT future safe with respect to Boost version numbers, and may break.


== Using Header\-Only libraries from within Boost: ==


.nf
   find_package( Boost 1.36.0 )
   if(Boost_FOUND)
      include_directories(${Boost_INCLUDE_DIRS})
      add_executable(foo foo.cc)
   endif()
.fi







== Using actual libraries from within Boost: ==


.nf
   set(Boost_USE_STATIC_LIBS        ON)
   set(Boost_USE_MULTITHREADED      ON)
   set(Boost_USE_STATIC_RUNTIME    OFF)
   find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... )
.fi




.nf
   if(Boost_FOUND)
      include_directories(${Boost_INCLUDE_DIRS})
      add_executable(foo foo.cc)
      target_link_libraries(foo ${Boost_LIBRARIES})
   endif()
.fi







The components list needs to contain actual names of boost libraries only, such as "date_time" for "libboost_date_time".  If you're using parts of Boost that contain header files only (e.g. foreach) you do not need to specify COMPONENTS.


You should provide a minimum version number that should be used. If you provide this version number and specify the REQUIRED attribute, this module will fail if it can't find the specified or a later version. If you specify a version number this is automatically put into the considered list of version numbers and thus doesn't need to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below).


NOTE for Visual Studio Users:


.nf
     Automatic linking is used on MSVC & Borland compilers by default when
     #including things in Boost.  It's important to note that setting
     Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking,
     should you need this feature.  Automatic linking typically uses static
     libraries with a few exceptions (Boost.Python is one).
.fi




.nf
     Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for
     more details.  Adding a TARGET_LINK_LIBRARIES() as shown in the example
     above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS
     gets set to OFF.  It is suggested you avoid automatic linking since it
     will make your application less portable.
.fi




=========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============


OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of boost version numbers that should be taken into account when searching for Boost. Unfortunately boost puts the version number into the actual filename for the libraries, so this variable will certainly be needed in the future when new Boost versions are released.


Currently this module searches for the following version numbers: 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0, 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0, 1.45, 1.45.0, 1.46, 1.46.0, 1.46.1, 1.47, 1.47.0, 1.48, 1.48.0


NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should add both 1.x and 1.x.0 as shown above.  Official Boost include directories omit the 3rd version number from include paths if it is 0 although not all binary Boost releases do so.


set(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0")


===================================== ============= ========================


Variables used by this module, they can change the default behaviour and need to be set before calling find_package:


.nf
   Boost_USE_MULTITHREADED      Can be set to OFF to use the non\-multithreaded
                                boost libraries.  If not specified, defaults
                                to ON.
.fi




.nf
   Boost_USE_STATIC_LIBS        Can be set to ON to force the use of the static
                                boost libraries. Defaults to OFF.
.fi




.nf
   Boost_NO_SYSTEM_PATHS        Set to TRUE to suppress searching in system
                                paths (or other locations outside of BOOST_ROOT
                                or BOOST_INCLUDEDIR).  Useful when specifying
                                BOOST_ROOT. Defaults to OFF.
                                  [Since CMake 2.8.3]
.fi




.nf
   Boost_NO_BOOST_CMAKE         Do not do a find_package call in config mode
                                before searching for a regular boost install.
                                This will avoid finding boost\-cmake installs.
                                Defaults to OFF.
                                  [Since CMake 2.8.6]
.fi




.nf
   Boost_USE_STATIC_RUNTIME     If enabled, searches for boost libraries
                                linked against a static C++ standard library
                                ('s' ABI tag). This option should be set to
                                ON or OFF because the default behavior
                                if not specified is platform dependent
                                for backwards compatibility.
                                  [Since CMake 2.8.3]
.fi




.nf
   Boost_USE_DEBUG_PYTHON       If enabled, searches for boost libraries
                                compiled against a special debug build of
                                Python ('y' ABI tag). Defaults to OFF.
                                  [Since CMake 2.8.3]
.fi




.nf
   Boost_USE_STLPORT            If enabled, searches for boost libraries
                                compiled against the STLPort standard
                                library ('p' ABI tag). Defaults to OFF.
                                  [Since CMake 2.8.3]
.fi




.nf
   Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
                                If enabled, searches for boost libraries
                                compiled against the deprecated STLPort
                                "native iostreams" feature ('n' ABI tag).
                                Defaults to OFF.
                                  [Since CMake 2.8.3]
.fi




Other Variables used by this module which you may want to set.


.nf
   Boost_ADDITIONAL_VERSIONS    A list of version numbers to use for searching
                                the boost include directory.  Please see
                                the documentation above regarding this
                                annoying, but necessary variable :(
.fi




.nf
   Boost_DEBUG                  Set this to TRUE to enable debugging output
                                of FindBoost.cmake if you are having problems.
                                Please enable this before filing any bug
                                reports.
.fi




.nf
   Boost_DETAILED_FAILURE_MSG   FindBoost doesn't output detailed information
                                about why it failed or how to fix the problem
                                unless this is set to TRUE or the REQUIRED
                                keyword is specified in find_package().
                                  [Since CMake 2.8.0]
.fi




.nf
   Boost_COMPILER               Set this to the compiler suffix used by Boost
                                (e.g. "\-gcc43") if FindBoost has problems finding
                                the proper Boost installation
.fi




.nf
   Boost_THREADAPI                When building boost.thread, sometimes the name of the
                                library contains an additional "pthread" or "win32"
                                string known as the threadapi.  This can happen when
                                compiling against pthreads on Windows or win32 threads
                                on Cygwin.  You may specify this variable and if set
                                when FindBoost searches for the Boost threading library
                                it will first try to match the threadapi you specify.
                                  For Example: libboost_thread_win32\-mgw45\-mt\-1_43.a
                                might be found if you specified "win32" here before
                                falling back on libboost_thread\-mgw45\-mt\-1_43.a.
                                  [Since CMake 2.8.3]
.fi




.nf
   Boost_REALPATH               Resolves symbolic links for discovered boost libraries
                                to assist with packaging.  For example, instead of
                                Boost_SYSTEM_LIBRARY_RELEASE being resolved to
                                "/usr/lib/libboost_system.so" it would be
                                "/usr/lib/libboost_system.so.1.42.0" instead.
                                This does not affect linking and should not be
                                enabled unless the user needs this information.
                                  [Since CMake 2.8.3]
.fi




.TP
.B FindBullet
Try to find the Bullet physics engine




.nf
  This module defines the following variables
.fi




.nf
  BULLET_FOUND \- Was bullet found
  BULLET_INCLUDE_DIRS \- the Bullet include directories
  BULLET_LIBRARIES \- Link to this, by default it includes
                     all bullet components (Dynamics,
                     Collision, LinearMath, & SoftBody)
.fi




.nf
  This module accepts the following variables
.fi




.nf
  BULLET_ROOT \- Can be set to bullet install path or Windows build path
.fi




.TP
.B FindCABLE
Find CABLE

This module finds if CABLE is installed and determines where the include files and libraries are.  This code sets the following variables:


.nf
  CABLE             the path to the cable executable
  CABLE_TCL_LIBRARY the path to the Tcl wrapper library
  CABLE_INCLUDE_DIR the path to the include directory
.fi




To build Tcl wrappers, you should add shared library and link it to ${CABLE_TCL_LIBRARY}.  You should also add ${CABLE_INCLUDE_DIR} as an include directory.

.TP
.B FindCUDA
Tools for building CUDA C files: libraries and build dependencies.

This script locates the NVIDIA CUDA C tools. It should work on linux, windows, and mac and should be reasonably up to date with CUDA C releases.


This script makes use of the standard find_package arguments of <VERSION>, REQUIRED and QUIET.  CUDA_FOUND will report if an acceptable version of CUDA was found.


The script will prompt the user to specify CUDA_TOOLKIT_ROOT_DIR if the prefix cannot be determined by the location of nvcc in the system path and REQUIRED is specified to find_package(). To use a different installed version of the toolkit set the environment variable CUDA_BIN_PATH before running cmake (e.g. CUDA_BIN_PATH=/usr/local/cuda1.0 instead of the default /usr/local/cuda) or set CUDA_TOOLKIT_ROOT_DIR after configuring.  If you change the value of CUDA_TOOLKIT_ROOT_DIR, various components that depend on the path will be relocated.


It might be necessary to set CUDA_TOOLKIT_ROOT_DIR manually on certain platforms, or to use a cuda runtime not installed in the default location. In newer versions of the toolkit the cuda library is included with the graphics driver\- be sure that the driver version matches what is needed by the cuda runtime version.


The following variables affect the behavior of the macros in the script (in alphebetical order).  Note that any of these flags can be changed multiple times in the same directory before calling CUDA_ADD_EXECUTABLE, CUDA_ADD_LIBRARY, CUDA_COMPILE, CUDA_COMPILE_PTX or CUDA_WRAP_SRCS.


.nf
  CUDA_64_BIT_DEVICE_CODE (Default matches host bit size)
  \-\- Set to ON to compile for 64 bit device code, OFF for 32 bit device code.
     Note that making this different from the host code when generating object
     or C files from CUDA code just won't work, because size_t gets defined by
     nvcc in the generated source.  If you compile to PTX and then load the
     file yourself, you can mix bit sizes between device and host.
.fi




.nf
  CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE (Default ON)
  \-\- Set to ON if you want the custom build rule to be attached to the source
     file in Visual Studio.  Turn OFF if you add the same cuda file to multiple
     targets.
.fi




.nf
     This allows the user to build the target from the CUDA file; however, bad
     things can happen if the CUDA source file is added to multiple targets.
     When performing parallel builds it is possible for the custom build
     command to be run more than once and in parallel causing cryptic build
     errors.  VS runs the rules for every source file in the target, and a
     source can have only one rule no matter how many projects it is added to.
     When the rule is run from multiple targets race conditions can occur on
     the generated file.  Eventually everything will get built, but if the user
     is unaware of this behavior, there may be confusion.  It would be nice if
     this script could detect the reuse of source files across multiple targets
     and turn the option off for the user, but no good solution could be found.
.fi




.nf
  CUDA_BUILD_CUBIN (Default OFF)
  \-\- Set to ON to enable and extra compilation pass with the \-cubin option in
     Device mode. The output is parsed and register, shared memory usage is
     printed during build.
.fi




.nf
  CUDA_BUILD_EMULATION (Default OFF for device mode)
  \-\- Set to ON for Emulation mode. \-D_DEVICEEMU is defined for CUDA C files
     when CUDA_BUILD_EMULATION is TRUE.
.fi




.nf
  CUDA_GENERATED_OUTPUT_DIR (Default CMAKE_CURRENT_BINARY_DIR)
  \-\- Set to the path you wish to have the generated files placed.  If it is
     blank output files will be placed in CMAKE_CURRENT_BINARY_DIR.
     Intermediate files will always be placed in
     CMAKE_CURRENT_BINARY_DIR/CMakeFiles.
.fi




.nf
  CUDA_HOST_COMPILATION_CPP (Default ON)
  \-\- Set to OFF for C compilation of host code.
.fi




.nf
  CUDA_NVCC_FLAGS
  CUDA_NVCC_FLAGS_<CONFIG>
  \-\- Additional NVCC command line arguments.  NOTE: multiple arguments must be
     semi\-colon delimited (e.g. \-\-compiler\-options;\-Wall)
.fi




.nf
  CUDA_PROPAGATE_HOST_FLAGS (Default ON)
  \-\- Set to ON to propagate CMAKE_{C,CXX}_FLAGS and their configuration
     dependent counterparts (e.g. CMAKE_C_FLAGS_DEBUG) automatically to the
     host compiler through nvcc's \-Xcompiler flag.  This helps make the
     generated host code match the rest of the system better.  Sometimes
     certain flags give nvcc problems, and this will help you turn the flag
     propagation off.  This does not affect the flags supplied directly to nvcc
     via CUDA_NVCC_FLAGS or through the OPTION flags specified through
     CUDA_ADD_LIBRARY, CUDA_ADD_EXECUTABLE, or CUDA_WRAP_SRCS.  Flags used for
     shared library compilation are not affected by this flag.
.fi




.nf
  CUDA_VERBOSE_BUILD (Default OFF)
  \-\- Set to ON to see all the commands used when building the CUDA file.  When
     using a Makefile generator the value defaults to VERBOSE (run make
     VERBOSE=1 to see output), although setting CUDA_VERBOSE_BUILD to ON will
     always print the output.
.fi




The script creates the following macros (in alphebetical order):


.nf
  CUDA_ADD_CUFFT_TO_TARGET( cuda_target )
  \-\- Adds the cufft library to the target (can be any target).  Handles whether
     you are in emulation mode or not.
.fi




.nf
  CUDA_ADD_CUBLAS_TO_TARGET( cuda_target )
  \-\- Adds the cublas library to the target (can be any target).  Handles
     whether you are in emulation mode or not.
.fi




.nf
  CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ...
                       [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
  \-\- Creates an executable "cuda_target" which is made up of the files
     specified.  All of the non CUDA C files are compiled using the standard
     build rules specified by CMAKE and the cuda files are compiled to object
     files using nvcc and the host compiler.  In addition CUDA_INCLUDE_DIRS is
     added automatically to include_directories().  Some standard CMake target
     calls can be used on the target after calling this macro
     (e.g. set_target_properties and target_link_libraries), but setting
     properties that adjust compilation flags will not affect code compiled by
     nvcc.  Such flags should be modified before calling CUDA_ADD_EXECUTABLE,
     CUDA_ADD_LIBRARY or CUDA_WRAP_SRCS.
.fi




.nf
  CUDA_ADD_LIBRARY( cuda_target file0 file1 ...
                    [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
  \-\- Same as CUDA_ADD_EXECUTABLE except that a library is created.
.fi




.nf
  CUDA_BUILD_CLEAN_TARGET()
  \-\- Creates a convience target that deletes all the dependency files
     generated.  You should make clean after running this target to ensure the
     dependency files get regenerated.
.fi




.nf
  CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE]
                [OPTIONS ...] )
  \-\- Returns a list of generated files from the input source files to be used
     with ADD_LIBRARY or ADD_EXECUTABLE.
.fi




.nf
  CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] )
  \-\- Returns a list of PTX files generated from the input source files.
.fi




.nf
  CUDA_INCLUDE_DIRECTORIES( path0 path1 ... )
  \-\- Sets the directories that should be passed to nvcc
     (e.g. nvcc \-Ipath0 \-Ipath1 ... ). These paths usually contain other .cu
     files.
.fi




.nf
  CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ...
                   [STATIC | SHARED | MODULE] [OPTIONS ...] )
  \-\- This is where all the magic happens.  CUDA_ADD_EXECUTABLE,
     CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this
     function under the hood.
.fi




.nf
     Given the list of files (file0 file1 ... fileN) this macro generates
     custom commands that generate either PTX or linkable objects (use "PTX" or
     "OBJ" for the format argument to switch).  Files that don't end with .cu
     or have the HEADER_FILE_ONLY property are ignored.
.fi




.nf
     The arguments passed in after OPTIONS are extra command line options to
     give to nvcc.  You can also specify per configuration options by
     specifying the name of the configuration followed by the options.  General
     options must preceed configuration specific options.  Not all
     configurations need to be specified, only the ones provided will be used.
.fi




.nf
        OPTIONS \-DFLAG=2 "\-DFLAG_OTHER=space in flag"
        DEBUG \-g
        RELEASE \-\-use_fast_math
        RELWITHDEBINFO \-\-use_fast_math;\-g
        MINSIZEREL \-\-use_fast_math
.fi




.nf
     For certain configurations (namely VS generating object files with
     CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will
     be produced for the given cuda file.  This is because when you add the
     cuda file to Visual Studio it knows that this file produces an object file
     and will link in the resulting object file automatically.
.fi




.nf
     This script will also generate a separate cmake script that is used at
     build time to invoke nvcc.  This is for several reasons.
.fi




.nf
       1. nvcc can return negative numbers as return values which confuses
       Visual Studio into thinking that the command succeeded.  The script now
       checks the error codes and produces errors when there was a problem.
.fi




.nf
       2. nvcc has been known to not delete incomplete results when it
       encounters problems.  This confuses build systems into thinking the
       target was generated when in fact an unusable file exists.  The script
       now deletes the output files if there was an error.
.fi




.nf
       3. By putting all the options that affect the build into a file and then
       make the build rule dependent on the file, the output files will be
       regenerated when the options change.
.fi




.nf
     This script also looks at optional arguments STATIC, SHARED, or MODULE to
     determine when to target the object compilation for a shared library.
     BUILD_SHARED_LIBS is ignored in CUDA_WRAP_SRCS, but it is respected in
     CUDA_ADD_LIBRARY.  On some systems special flags are added for building
     objects intended for shared libraries.  A preprocessor macro,
     <target_name>_EXPORTS is defined when a shared library compilation is
     detected.
.fi




.nf
     Flags passed into add_definitions with \-D or /D are passed along to nvcc.
.fi




The script defines the following variables:


.nf
  CUDA_VERSION_MAJOR    \-\- The major version of cuda as reported by nvcc.
  CUDA_VERSION_MINOR    \-\- The minor version.
  CUDA_VERSION
  CUDA_VERSION_STRING   \-\- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR
.fi




.nf
  CUDA_TOOLKIT_ROOT_DIR \-\- Path to the CUDA Toolkit (defined if not set).
  CUDA_SDK_ROOT_DIR     \-\- Path to the CUDA SDK.  Use this to find files in the
                           SDK.  This script will not directly support finding
                           specific libraries or headers, as that isn't
                           supported by NVIDIA.  If you want to change
                           libraries when the path changes see the
                           FindCUDA.cmake script for an example of how to clear
                           these variables.  There are also examples of how to
                           use the CUDA_SDK_ROOT_DIR to locate headers or
                           libraries, if you so choose (at your own risk).
  CUDA_INCLUDE_DIRS     \-\- Include directory for cuda headers.  Added automatically
                           for CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY.
  CUDA_LIBRARIES        \-\- Cuda RT library.
  CUDA_CUFFT_LIBRARIES  \-\- Device or emulation library for the Cuda FFT
                           implementation (alternative to:
                           CUDA_ADD_CUFFT_TO_TARGET macro)
  CUDA_CUBLAS_LIBRARIES \-\- Device or emulation library for the Cuda BLAS
                           implementation (alterative to:
                           CUDA_ADD_CUBLAS_TO_TARGET macro).
.fi







.nf
  James Bigler, NVIDIA Corp (nvidia.com \- jbigler)
  Abe Stephens, SCI Institute \-\- http://www.sci.utah.edu/~abe/FindCuda.html
.fi




.nf
  Copyright (c) 2008 \- 2009 NVIDIA Corporation.  All rights reserved.
.fi




.nf
  Copyright (c) 2007\-2009
  Scientific Computing and Imaging Institute, University of Utah
.fi




.nf
  This code is licensed under the MIT License.  See the FindCUDA.cmake script
  for the text of the license.
.fi

.TP
.B FindCURL
Find curl

Find the native CURL headers and libraries.


.nf
  CURL_INCLUDE_DIRS \- where to find curl/curl.h, etc.
  CURL_LIBRARIES    \- List of libraries when using curl.
  CURL_FOUND        \- True if curl found.
.fi

.TP
.B FindCVS
.nf
 
.fi

The module defines the following variables:


.nf
   CVS_EXECUTABLE \- path to cvs command line client
   CVS_FOUND \- true if the command line client was found
.fi

Example usage:


.nf
   find_package(CVS)
   if(CVS_FOUND)
     message("CVS found: ${CVS_EXECUTABLE}")
   endif(CVS_FOUND)
.fi

.TP
.B FindCoin3D
Find Coin3D (Open Inventor)

Coin3D is an implementation of the Open Inventor API. It provides data structures and algorithms for 3D visualization http://www.coin3d.org/


This module defines the following variables


.nf
  COIN3D_FOUND         \- system has Coin3D \- Open Inventor
  COIN3D_INCLUDE_DIRS  \- where the Inventor include directory can be found
  COIN3D_LIBRARIES     \- Link to this to use Coin3D
.fi




.TP
.B FindCups
Try to find the Cups printing system

Once done this will define


.nf
  CUPS_FOUND \- system has Cups
  CUPS_INCLUDE_DIR \- the Cups include directory
  CUPS_LIBRARIES \- Libraries needed to use Cups
  Set CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE to TRUE if you need a version which 
  features this function (i.e. at least 1.1.19)
.fi

.TP
.B FindCurses
Find the curses include file and library




.nf
  CURSES_FOUND \- system has Curses
  CURSES_INCLUDE_DIR \- the Curses include directory
  CURSES_LIBRARIES \- The libraries needed to use Curses
  CURSES_HAVE_CURSES_H \- true if curses.h is available
  CURSES_HAVE_NCURSES_H \- true if ncurses.h is available
  CURSES_HAVE_NCURSES_NCURSES_H \- true if ncurses/ncurses.h is available
  CURSES_HAVE_NCURSES_CURSES_H \- true if ncurses/curses.h is available
  CURSES_LIBRARY \- set for backwards compatibility with 2.4 CMake
.fi




Set CURSES_NEED_NCURSES to TRUE before the FIND_PACKAGE() command if NCurses  functionality is required.

.TP
.B FindCxxTest
Find CxxTest

Find the CxxTest suite and declare a helper macro for creating unit tests and integrating them with CTest. For more details on CxxTest see http://cxxtest.tigris.org


INPUT Variables


.nf
   CXXTEST_USE_PYTHON [deprecated since 1.3]
       Only used in the case both Python & Perl
       are detected on the system to control
       which CxxTest code generator is used.
.fi




.nf
       NOTE: In older versions of this Find Module,
       this variable controlled if the Python test
       generator was used instead of the Perl one,
       regardless of which scripting language the
       user had installed.
.fi




.nf
   CXXTEST_TESTGEN_ARGS (since CMake 2.8.3)
       Specify a list of options to pass to the CxxTest code
       generator.  If not defined, \-\-error\-printer is
       passed.
.fi




OUTPUT Variables


.nf
   CXXTEST_FOUND
       True if the CxxTest framework was found
   CXXTEST_INCLUDE_DIRS
       Where to find the CxxTest include directory
   CXXTEST_PERL_TESTGEN_EXECUTABLE
       The perl\-based test generator
   CXXTEST_PYTHON_TESTGEN_EXECUTABLE
       The python\-based test generator
   CXXTEST_TESTGEN_EXECUTABLE (since CMake 2.8.3)
       The test generator that is actually used (chosen using user preferences
       and interpreters found in the system)
   CXXTEST_TESTGEN_INTERPRETER (since CMake 2.8.3)
       The full path to the Perl or Python executable on the system
.fi




MACROS for optional use by CMake users:


.nf
    CXXTEST_ADD_TEST(<test_name> <gen_source_file> <input_files_to_testgen...>)
       Creates a CxxTest runner and adds it to the CTest testing suite
       Parameters:
           test_name               The name of the test
           gen_source_file         The generated source filename to be
                                   generated by CxxTest
           input_files_to_testgen  The list of header files containing the
                                   CxxTest::TestSuite's to be included in
                                   this runner
           
       #==============
       Example Usage:
.fi




.nf
           find_package(CxxTest)
           if(CXXTEST_FOUND)
               include_directories(${CXXTEST_INCLUDE_DIR})
               enable_testing()
.fi




.nf
               CXXTEST_ADD_TEST(unittest_foo foo_test.cc
                                 ${CMAKE_CURRENT_SOURCE_DIR}/foo_test.h)
               target_link_libraries(unittest_foo foo) # as needed
           endif()
.fi




.nf
              This will (if CxxTest is found):
              1. Invoke the testgen executable to autogenerate foo_test.cc in the
                 binary tree from "foo_test.h" in the current source directory.
              2. Create an executable and test called unittest_foo.
               
      #=============
      Example foo_test.h:
.fi




.nf
          #include <cxxtest/TestSuite.h>
          
          class MyTestSuite : public CxxTest::TestSuite 
          {
          public:
             void testAddition( void )
             {
                TS_ASSERT( 1 + 1 > 1 );
                TS_ASSERT_EQUALS( 1 + 1, 2 );
             }
          };
.fi




.TP
.B FindCygwin
this module looks for Cygwin




.TP
.B FindDCMTK
find DCMTK libraries and applications




.TP
.B FindDart
Find DART

This module looks for the dart testing software and sets DART_ROOT to point to where it found it.


.TP
.B FindDevIL
.nf
 
.fi

This module locates the developer's image library. http://openil.sourceforge.net/


This module sets: IL_LIBRARIES the name of the IL library. These include the full path to the core DevIL library. This one has to be linked into the application. ILU_LIBRARIES the name of the ILU library. Again, the full path. This library is for filters and effects, not actual loading. It doesn't have to be linked if the functionality it provides is not used. ILUT_LIBRARIES the name of the ILUT library. Full path. This part of the library interfaces with OpenGL. It is not strictly needed in applications. IL_INCLUDE_DIR where to find the il.h, ilu.h and ilut.h files. IL_FOUND this is set to TRUE if all the above variables were set. This will be set to false if ILU or ILUT are not found, even if they are not needed. In most systems, if one library is found all the others are as well. That's the way the DevIL developers release it.

.TP
.B FindDoxygen
This module looks for Doxygen and the path to Graphviz's dot

Doxygen is a documentation generation tool.  Please see http://www.doxygen.org


This module accepts the following optional variables:


.nf
   DOXYGEN_SKIP_DOT       = If true this module will skip trying to find Dot
                            (an optional component often used by Doxygen)
.fi




This modules defines the following variables:


.nf
   DOXYGEN_EXECUTABLE     = The path to the doxygen command.
   DOXYGEN_FOUND          = Was Doxygen found or not?
.fi




.nf
   DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
   DOXYGEN_DOT_FOUND      = Was Dot found or not?
   DOXYGEN_DOT_PATH       = The path to dot not including the executable
.fi







.TP
.B FindEXPAT
Find expat

Find the native EXPAT headers and libraries.


.nf
  EXPAT_INCLUDE_DIRS \- where to find expat.h, etc.
  EXPAT_LIBRARIES    \- List of libraries when using expat.
  EXPAT_FOUND        \- True if expat found.
.fi

.TP
.B FindFLEX
Find flex executable and provides a macro to generate custom build rules




The module defines the following variables:


.nf
  FLEX_FOUND \- true is flex executable is found
  FLEX_EXECUTABLE \- the path to the flex executable
  FLEX_VERSION \- the version of flex
  FLEX_LIBRARIES \- The flex libraries
  FLEX_INCLUDE_DIRS \- The path to the flex headers
.fi




The minimum required version of flex can be specified using the standard syntax, e.g. FIND_PACKAGE(FLEX 2.5.13)





If flex is found on the system, the module provides the macro:


.nf
  FLEX_TARGET(Name FlexInput FlexOutput [COMPILE_FLAGS <string>])
.fi

which creates a custom command  to generate the <FlexOutput> file from the <FlexInput> file.  If  COMPILE_FLAGS option is specified, the next parameter is added to the flex  command line. Name is an alias used to get  details of  this custom  command.  Indeed the  macro defines  the following variables:


.nf
  FLEX_${Name}_DEFINED \- true is the macro ran successfully
  FLEX_${Name}_OUTPUTS \- the source file generated by the custom rule, an
  alias for FlexOutput
  FLEX_${Name}_INPUT \- the flex source file, an alias for ${FlexInput}
.fi




Flex scanners oftenly use tokens  defined by Bison: the code generated by Flex  depends of the header  generated by Bison.   This module also defines a macro:


.nf
  ADD_FLEX_BISON_DEPENDENCY(FlexTarget BisonTarget)
.fi

which  adds the  required dependency  between a  scanner and  a parser where  <FlexTarget>  and <BisonTarget>  are  the  first parameters  of respectively FLEX_TARGET and BISON_TARGET macros.


.nf
  ====================================================================
  Example:
.fi




.nf
   find_package(BISON)
   find_package(FLEX)
.fi




.nf
   BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
   FLEX_TARGET(MyScanner lexer.l  ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
   ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
.fi




.nf
   include_directories(${CMAKE_CURRENT_BINARY_DIR})
   add_executable(Foo
      Foo.cc
      ${BISON_MyParser_OUTPUTS}
      ${FLEX_MyScanner_OUTPUTS}
   )
  ====================================================================
.fi

.TP
.B FindFLTK
Find the native FLTK includes and library




By default FindFLTK.cmake will search for all of the FLTK components and add them to the FLTK_LIBRARIES variable.


.nf
   You can limit the components which get placed in FLTK_LIBRARIES by
   defining one or more of the following three options:
.fi




.nf
     FLTK_SKIP_OPENGL, set to true to disable searching for opengl and
                       the FLTK GL library
     FLTK_SKIP_FORMS, set to true to disable searching for fltk_forms
     FLTK_SKIP_IMAGES, set to true to disable searching for fltk_images
.fi




.nf
     FLTK_SKIP_FLUID, set to true if the fluid binary need not be present
                      at build time
.fi




The following variables will be defined:


.nf
     FLTK_FOUND, True if all components not skipped were found
     FLTK_INCLUDE_DIR, where to find include files
     FLTK_LIBRARIES, list of fltk libraries you should link against
     FLTK_FLUID_EXECUTABLE, where to find the Fluid tool
     FLTK_WRAP_UI, This enables the FLTK_WRAP_UI command
.fi




The following cache variables are assigned but should not be used. See the FLTK_LIBRARIES variable instead.


.nf
     FLTK_BASE_LIBRARY   = the full path to fltk.lib
     FLTK_GL_LIBRARY     = the full path to fltk_gl.lib
     FLTK_FORMS_LIBRARY  = the full path to fltk_forms.lib
     FLTK_IMAGES_LIBRARY = the full path to fltk_images.lib
.fi

.TP
.B FindFLTK2
Find the native FLTK2 includes and library

The following settings are defined


.nf
  FLTK2_FLUID_EXECUTABLE, where to find the Fluid tool
  FLTK2_WRAP_UI, This enables the FLTK2_WRAP_UI command
  FLTK2_INCLUDE_DIR, where to find include files
  FLTK2_LIBRARIES, list of fltk2 libraries
  FLTK2_FOUND, Don't use FLTK2 if false.
.fi

The following settings should not be used in general.


.nf
  FLTK2_BASE_LIBRARY   = the full path to fltk2.lib
  FLTK2_GL_LIBRARY     = the full path to fltk2_gl.lib
  FLTK2_IMAGES_LIBRARY = the full path to fltk2_images.lib
.fi

.TP
.B FindFreetype
Locate FreeType library

This module defines


.nf
  FREETYPE_LIBRARIES, the library to link against
  FREETYPE_FOUND, if false, do not try to link to FREETYPE
  FREETYPE_INCLUDE_DIRS, where to find headers.
  This is the concatenation of the paths:
  FREETYPE_INCLUDE_DIR_ft2build
  FREETYPE_INCLUDE_DIR_freetype2
.fi




$FREETYPE_DIR is an environment variable that would correspond to the ./configure \-\-prefix=$FREETYPE_DIR used in building FREETYPE.

.TP
.B FindGCCXML
Find the GCC\-XML front\-end executable.




This module will define the following variables:


.nf
  GCCXML \- the GCC\-XML front\-end executable.
.fi

.TP
.B FindGDAL
.nf
 
.fi

Locate gdal


This module accepts the following environment variables:


.nf
    GDAL_DIR or GDAL_ROOT \- Specify the location of GDAL
.fi




This module defines the following CMake variables:


.nf
    GDAL_FOUND \- True if libgdal is found
    GDAL_LIBRARY \- A variable pointing to the GDAL library
    GDAL_INCLUDE_DIR \- Where to find the headers
.fi

.TP
.B FindGIF
.nf
 
.fi

This module searches giflib and defines GIF_LIBRARIES \- libraries to link to in order to use GIF GIF_FOUND, if false, do not try to link GIF_INCLUDE_DIR, where to find the headers GIF_VERSION, reports either version 4 or 3 (for everything before version 4)


The minimum required version of giflib can be specified using the standard syntax, e.g. FIND_PACKAGE(GIF 4)


$GIF_DIR is an environment variable that would correspond to the ./configure \-\-prefix=$GIF_DIR

.TP
.B FindGLUT
try to find glut library and include files

.nf
  GLUT_INCLUDE_DIR, where to find GL/glut.h, etc.
  GLUT_LIBRARIES, the libraries to link against
  GLUT_FOUND, If false, do not try to use GLUT.
.fi

Also defined, but not for general use are:


.nf
  GLUT_glut_LIBRARY = the full path to the glut library.
  GLUT_Xmu_LIBRARY  = the full path to the Xmu library.
  GLUT_Xi_LIBRARY   = the full path to the Xi Library.
.fi

.TP
.B FindGTK
try to find GTK (and glib) and GTKGLArea

.nf
  GTK_INCLUDE_DIR   \- Directories to include to use GTK
  GTK_LIBRARIES     \- Files to link against to use GTK
  GTK_FOUND         \- GTK was found
  GTK_GL_FOUND      \- GTK's GL features were found
.fi

.TP
.B FindGTK2
FindGTK2.cmake

This module can find the GTK2 widget libraries and several of its other optional components like gtkmm, glade, and glademm.


NOTE: If you intend to use version checking, CMake 2.6.2 or later is


.nf
       required.
.fi




Specify one or more of the following components as you call this find module. See example below.


.nf
   gtk
   gtkmm
   glade
   glademm
.fi




The following variables will be defined for your use


.nf
   GTK2_FOUND \- Were all of your specified components found?
   GTK2_INCLUDE_DIRS \- All include directories
   GTK2_LIBRARIES \- All libraries
.fi




.nf
   GTK2_VERSION \- The version of GTK2 found (x.y.z)
   GTK2_MAJOR_VERSION \- The major version of GTK2
   GTK2_MINOR_VERSION \- The minor version of GTK2
   GTK2_PATCH_VERSION \- The patch version of GTK2
.fi




Optional variables you can define prior to calling this module:


.nf
   GTK2_DEBUG \- Enables verbose debugging of the module
   GTK2_SKIP_MARK_AS_ADVANCED \- Disable marking cache variables as advanced
   GTK2_ADDITIONAL_SUFFIXES \- Allows defining additional directories to
                              search for include files
.fi




================= Example Usage:


.nf
   Call find_package() once, here are some examples to pick from:
.fi




.nf
   Require GTK 2.6 or later
       find_package(GTK2 2.6 REQUIRED gtk)
.fi




.nf
   Require GTK 2.10 or later and Glade
       find_package(GTK2 2.10 REQUIRED gtk glade)
.fi




.nf
   Search for GTK/GTKMM 2.8 or later
       find_package(GTK2 2.8 COMPONENTS gtk gtkmm)
.fi




.nf
   if(GTK2_FOUND)
      include_directories(${GTK2_INCLUDE_DIRS})
      add_executable(mygui mygui.cc)
      target_link_libraries(mygui ${GTK2_LIBRARIES})
   endif()
.fi




.TP
.B FindGTest
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-

Locate the Google C++ Testing Framework.


Defines the following variables:


.nf
   GTEST_FOUND \- Found the Google Testing framework
   GTEST_INCLUDE_DIRS \- Include directories
.fi




Also defines the library variables below as normal variables.  These contain debug/optimized keywords when a debugging library is found.


.nf
   GTEST_BOTH_LIBRARIES \- Both libgtest & libgtest\-main
   GTEST_LIBRARIES \- libgtest
   GTEST_MAIN_LIBRARIES \- libgtest\-main
.fi




Accepts the following variables as input:


.nf
   GTEST_ROOT \- (as a CMake or environment variable)
                The root directory of the gtest install prefix
.fi




.nf
   GTEST_MSVC_SEARCH \- If compiling with MSVC, this variable can be set to
                       "MD" or "MT" to enable searching a GTest build tree
                       (defaults: "MD")
.fi




Example Usage:


.nf
    enable_testing()
    find_package(GTest REQUIRED)
    include_directories(${GTEST_INCLUDE_DIRS})
.fi




.nf
    add_executable(foo foo.cc)
    target_link_libraries(foo ${GTEST_BOTH_LIBRARIES})
.fi




.nf
    add_test(AllTestsInFoo foo)
.fi







If you would like each Google test to show up in CTest as a test you may use the following macro. NOTE: It will slow down your tests by running an executable for each test and test fixture.  You will also have to rerun CMake after adding or removing tests or test fixtures.


GTEST_ADD_TESTS(executable extra_args ARGN)


.nf
    executable = The path to the test executable
    extra_args = Pass a list of extra arguments to be passed to
                 executable enclosed in quotes (or "" for none)
    ARGN =       A list of source files to search for tests & test
                 fixtures.
.fi




.nf
  Example:
     set(FooTestArgs \-\-foo 1 \-\-bar 2)
     add_executable(FooTest FooUnitTest.cc)
     GTEST_ADD_TESTS(FooTest "${FooTestArgs}" FooUnitTest.cc)
.fi

.TP
.B FindGettext
Find GNU gettext tools

This module looks for the GNU gettext tools. This module defines the following values:


.nf
  GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool.
  GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool.
  GETTEXT_FOUND: True if gettext has been found.
.fi




Additionally it provides the following macros: GETTEXT_CREATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN )


.nf
    This will create a target "translations" which will convert the
    given input po files into the binary output mo file. If the
    ALL option is used, the translations will also be created when
    building the default target.
.fi

GETTEXT_PROCESS_POT( <potfile> [ALL] [INSTALL_DESTINATION <destdir>] LANGUAGES <lang1> <lang2> ... )


.nf
     Process the given pot file to mo files.
     If INSTALL_DESTINATION is given then automatically install rules will be created,
     the language subdirectory will be taken into account (by default use share/locale/).
     If ALL is specified, the pot file is processed when building the all traget.
     It creates a custom target "potfile".
.fi

GETTEXT_PROCESS_PO_FILES( <lang> [ALL] [INSTALL_DESTINATION <dir>] PO_FILES <po1> <po2> ... )


.nf
     Process the given po files to mo files for the given language.
     If INSTALL_DESTINATION is given then automatically install rules will be created,
     the language subdirectory will be taken into account (by default use share/locale/).
     If ALL is specified, the po files are processed when building the all traget.
     It creates a custom target "pofiles".
.fi

.TP
.B FindGit
.nf
 
.fi

The module defines the following variables:


.nf
   GIT_EXECUTABLE \- path to git command line client
   GIT_FOUND \- true if the command line client was found
.fi

Example usage:


.nf
   find_package(Git)
   if(GIT_FOUND)
     message("git found: ${GIT_EXECUTABLE}")
   endif()
.fi

.TP
.B FindGnuTLS
Try to find the GNU Transport Layer Security library (gnutls)




Once done this will define


.nf
  GNUTLS_FOUND \- System has gnutls
  GNUTLS_INCLUDE_DIR \- The gnutls include directory
  GNUTLS_LIBRARIES \- The libraries needed to use gnutls
  GNUTLS_DEFINITIONS \- Compiler switches required for using gnutls
.fi

.TP
.B FindGnuplot
this module looks for gnuplot




Once done this will define


.nf
  GNUPLOT_FOUND \- system has Gnuplot
  GNUPLOT_EXECUTABLE \- the Gnuplot executable
.fi

.TP
.B FindHDF5
Find HDF5, a library for reading and writing self describing array data.




This module invokes the HDF5 wrapper compiler that should be installed alongside HDF5.  Depending upon the HDF5 Configuration, the wrapper compiler is called either h5cc or h5pcc.  If this succeeds, the module will then call the compiler with the \-show argument to see what flags are used when compiling an HDF5 client application.


The module will optionally accept the COMPONENTS argument.  If no COMPONENTS are specified, then the find module will default to finding only the HDF5 C library.  If one or more COMPONENTS are specified, the module will attempt to find the language bindings for the specified components.  The only valid components are C, CXX, Fortran, HL, and Fortran_HL.  If the COMPONENTS argument is not given, the module will attempt to find only the C bindings.


On UNIX systems, this module will read the variable HDF5_USE_STATIC_LIBRARIES to determine whether or not to prefer a static link to a dynamic link for HDF5 and all of it's dependencies.  To use this feature, make sure that the HDF5_USE_STATIC_LIBRARIES variable is set before the call to find_package.


To provide the module with a hint about where to find your HDF5 installation, you can set the environment variable HDF5_ROOT.  The Find module will then look in this path when searching for HDF5 executables, paths, and libraries.


In addition to finding the includes and libraries required to compile an HDF5 client application, this module also makes an effort to find tools that come with the HDF5 distribution that may be useful for regression testing.


This module will define the following variables:


.nf
  HDF5_INCLUDE_DIRS \- Location of the hdf5 includes
  HDF5_INCLUDE_DIR \- Location of the hdf5 includes (deprecated)
  HDF5_DEFINITIONS \- Required compiler definitions for HDF5
  HDF5_C_LIBRARIES \- Required libraries for the HDF5 C bindings.
  HDF5_CXX_LIBRARIES \- Required libraries for the HDF5 C++ bindings
  HDF5_Fortran_LIBRARIES \- Required libraries for the HDF5 Fortran bindings
  HDF5_HL_LIBRARIES \- Required libraries for the HDF5 high level API
  HDF5_Fortran_HL_LIBRARIES \- Required libraries for the high level Fortran
                              bindings.
  HDF5_LIBRARIES \- Required libraries for all requested bindings
  HDF5_FOUND \- true if HDF5 was found on the system
  HDF5_LIBRARY_DIRS \- the full set of library directories
  HDF5_IS_PARALLEL \- Whether or not HDF5 was found with parallel IO support
  HDF5_C_COMPILER_EXECUTABLE \- the path to the HDF5 C wrapper compiler
  HDF5_CXX_COMPILER_EXECUTABLE \- the path to the HDF5 C++ wrapper compiler
  HDF5_Fortran_COMPILER_EXECUTABLE \- the path to the HDF5 Fortran wrapper compiler
  HDF5_DIFF_EXECUTABLE \- the path to the HDF5 dataset comparison tool
.fi

.TP
.B FindHSPELL
Try to find Hspell

Once done this will define


.nf
  HSPELL_FOUND \- system has Hspell
  HSPELL_INCLUDE_DIR \- the Hspell include directory
  HSPELL_LIBRARIES \- The libraries needed to use Hspell
  HSPELL_DEFINITIONS \- Compiler switches required for using Hspell
.fi




.nf
  HSPELL_VERSION_STRING \- The version of Hspell found (x.y)
  HSPELL_MAJOR_VERSION  \- the major version of Hspell
  HSPELL_MINOR_VERSION  \- The minor version of Hspell
.fi

.TP
.B FindHTMLHelp
This module looks for Microsoft HTML Help Compiler

It defines:


.nf
   HTML_HELP_COMPILER     : full path to the Compiler (hhc.exe)
   HTML_HELP_INCLUDE_PATH : include path to the API (htmlhelp.h)
   HTML_HELP_LIBRARY      : full path to the library (htmlhelp.lib)
.fi




.TP
.B FindITK
Find an ITK installation or build tree.

.TP
.B FindImageMagick
Find the ImageMagick binary suite.

This module will search for a set of ImageMagick tools specified as components in the FIND_PACKAGE call. Typical components include, but are not limited to (future versions of ImageMagick might have additional components not listed here):


.nf
  animate
  compare
  composite
  conjure
  convert
  display
  identify
  import
  mogrify
  montage
  stream
.fi




If no component is specified in the FIND_PACKAGE call, then it only searches for the ImageMagick executable directory. This code defines the following variables:


.nf
  ImageMagick_FOUND                  \- TRUE if all components are found.
  ImageMagick_EXECUTABLE_DIR         \- Full path to executables directory.
  ImageMagick_<component>_FOUND      \- TRUE if <component> is found.
  ImageMagick_<component>_EXECUTABLE \- Full path to <component> executable.
.fi




There are also components for the following ImageMagick APIs:


.nf
  Magick++
  MagickWand
  MagickCore
.fi




For these components the following variables are set:


.nf
  ImageMagick_FOUND                    \- TRUE if all components are found.
  ImageMagick_INCLUDE_DIRS             \- Full paths to all include dirs.
  ImageMagick_LIBRARIES                \- Full paths to all libraries.
  ImageMagick_<component>_FOUND        \- TRUE if <component> is found.
  ImageMagick_<component>_INCLUDE_DIRS \- Full path to <component> include dirs.
  ImageMagick_<component>_LIBRARIES    \- Full path to <component> libraries.
.fi




Example Usages:


.nf
  FIND_PACKAGE(ImageMagick)
  FIND_PACKAGE(ImageMagick COMPONENTS convert)
  FIND_PACKAGE(ImageMagick COMPONENTS convert mogrify display)
  FIND_PACKAGE(ImageMagick COMPONENTS Magick++)
  FIND_PACKAGE(ImageMagick COMPONENTS Magick++ convert)
.fi




Note that the standard FIND_PACKAGE features are supported (i.e., QUIET, REQUIRED, etc.).

.TP
.B FindJNI
Find JNI java libraries.

This module finds if Java is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:


.nf
   
  JNI_INCLUDE_DIRS      = the include dirs to use
  JNI_LIBRARIES         = the libraries to use
  JNI_FOUND             = TRUE if JNI headers and libraries were found.
  JAVA_AWT_LIBRARY      = the path to the jawt library
  JAVA_JVM_LIBRARY      = the path to the jvm library
  JAVA_INCLUDE_PATH     = the include path to jni.h
  JAVA_INCLUDE_PATH2    = the include path to jni_md.h
  JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
.fi




.TP
.B FindJPEG
Find JPEG

Find the native JPEG includes and library This module defines


.nf
  JPEG_INCLUDE_DIR, where to find jpeglib.h, etc.
  JPEG_LIBRARIES, the libraries needed to use JPEG.
  JPEG_FOUND, If false, do not try to use JPEG.
.fi

also defined, but not for general use are


.nf
  JPEG_LIBRARY, where to find the JPEG library.
.fi

.TP
.B FindJasper
Try to find the Jasper JPEG2000 library

Once done this will define


.nf
  JASPER_FOUND \- system has Jasper
  JASPER_INCLUDE_DIR \- the Jasper include directory
  JASPER_LIBRARIES \- The libraries needed to use Jasper
.fi

.TP
.B FindJava
Find Java

This module finds if Java is installed and determines where the include files and libraries are. This code sets the following variables:


.nf
  Java_JAVA_EXECUTABLE    = the full path to the Java runtime
  Java_JAVAC_EXECUTABLE   = the full path to the Java compiler
  Java_JAVAH_EXECUTABLE   = the full path to the Java header generator
  Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator
  Java_JAR_EXECUTABLE     = the full path to the Java archiver
  Java_VERSION_STRING     = Version of the package found (java version), eg. 1.6.0_12
  Java_VERSION_MAJOR      = The major version of the package found.
  Java_VERSION_MINOR      = The minor version of the package found.
  Java_VERSION_PATCH      = The patch version of the package found.
  Java_VERSION_TWEAK      = The tweak version of the package found (after '_')
  Java_VERSION            = This is set to: $major.$minor.$patch(.$tweak)
.fi




The minimum required version of Java can be specified using the standard CMake syntax, e.g. FIND_PACKAGE(Java 1.5)


NOTE: ${Java_VERSION} and ${Java_VERSION_STRING} are not guaranteed to be identical. For example some java version may return: Java_VERSION_STRING = 1.5.0_17 and Java_VERSION        = 1.5.0.17


another example is the Java OEM, with: Java_VERSION_STRING = 1.6.0\-oem and Java_VERSION        = 1.6.0


For these components the following variables are set:


.nf
  Java_FOUND                    \- TRUE if all components are found.
  Java_INCLUDE_DIRS             \- Full paths to all include dirs.
  Java_LIBRARIES                \- Full paths to all libraries.
  Java_<component>_FOUND        \- TRUE if <component> is found.
.fi




Example Usages:


.nf
  FIND_PACKAGE(Java)
  FIND_PACKAGE(Java COMPONENTS Runtime)
  FIND_PACKAGE(Java COMPONENTS Development)
.fi




.TP
.B FindKDE3
Find the KDE3 include and library dirs, KDE preprocessors and define a some macros




This module defines the following variables:


.nf
  KDE3_DEFINITIONS         \- compiler definitions required for compiling KDE software
  KDE3_INCLUDE_DIR         \- the KDE include directory
  KDE3_INCLUDE_DIRS        \- the KDE and the Qt include directory, for use with INCLUDE_DIRECTORIES()
  KDE3_LIB_DIR             \- the directory where the KDE libraries are installed, for use with LINK_DIRECTORIES()
  QT_AND_KDECORE_LIBS      \- this contains both the Qt and the kdecore library
  KDE3_DCOPIDL_EXECUTABLE  \- the dcopidl executable
  KDE3_DCOPIDL2CPP_EXECUTABLE \- the dcopidl2cpp executable
  KDE3_KCFGC_EXECUTABLE    \- the kconfig_compiler executable
  KDE3_FOUND               \- set to TRUE if all of the above has been found
.fi




The following user adjustable options are provided:


.nf
  KDE3_BUILD_TESTS \- enable this to build KDE testcases
.fi







It also adds the following macros (from KDE3Macros.cmake) SRCS_VAR is always the variable which contains the list of source files for your application or library.


KDE3_AUTOMOC(file1 ... fileN)


.nf
    Call this if you want to have automatic moc file handling.
    This means if you include "foo.moc" in the source file foo.cpp
    a moc file for the header foo.h will be created automatically.
    You can set the property SKIP_AUTOMAKE using SET_SOURCE_FILES_PROPERTIES()
    to exclude some files in the list from being processed.
.fi




KDE3_ADD_MOC_FILES(SRCS_VAR file1 ... fileN )


.nf
    If you don't use the KDE3_AUTOMOC() macro, for the files
    listed here moc files will be created (named "foo.moc.cpp")
.fi




KDE3_ADD_DCOP_SKELS(SRCS_VAR header1.h ... headerN.h )


.nf
    Use this to generate DCOP skeletions from the listed headers.
.fi




KDE3_ADD_DCOP_STUBS(SRCS_VAR header1.h ... headerN.h )


.nf
     Use this to generate DCOP stubs from the listed headers.
.fi




KDE3_ADD_UI_FILES(SRCS_VAR file1.ui ... fileN.ui )


.nf
    Use this to add the Qt designer ui files to your application/library.
.fi




KDE3_ADD_KCFG_FILES(SRCS_VAR file1.kcfgc ... fileN.kcfgc )


.nf
    Use this to add KDE kconfig compiler files to your application/library.
.fi




KDE3_INSTALL_LIBTOOL_FILE(target)


.nf
    This will create and install a simple libtool file for the given target.
.fi




KDE3_ADD_EXECUTABLE(name file1 ... fileN )


.nf
    Currently identical to ADD_EXECUTABLE(), may provide some advanced features in the future.
.fi




KDE3_ADD_KPART(name [WITH_PREFIX] file1 ... fileN )


.nf
    Create a KDE plugin (KPart, kioslave, etc.) from the given source files.
    If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't.
    It creates and installs an appropriate libtool la\-file.
.fi




KDE3_ADD_KDEINIT_EXECUTABLE(name file1 ... fileN )


.nf
    Create a KDE application in the form of a module loadable via kdeinit.
    A library named kdeinit_<name> will be created and a small executable which links to it.
.fi




The option KDE3_ENABLE_FINAL to enable all\-in\-one compilation is no longer supported.





Author: Alexander Neundorf <neundorf@kde.org>

.TP
.B FindKDE4
.nf
 
.fi

Find KDE4 and provide all necessary variables and macros to compile software for it. It looks for KDE 4 in the following directories in the given order:


.nf
  CMAKE_INSTALL_PREFIX
  KDEDIRS
  /opt/kde4
.fi




Please look in FindKDE4Internal.cmake and KDE4Macros.cmake for more information. They are installed with the KDE 4 libraries in $KDEDIRS/share/apps/cmake/modules/.


Author: Alexander Neundorf <neundorf@kde.org>

.TP
.B FindLAPACK
Find LAPACK library

This module finds an installed fortran library that implements the LAPACK linear\-algebra interface (see http://www.netlib.org/lapack/).


The approach follows that taken for the autoconf macro file, acx_lapack.m4 (distributed at http://ac\-archive.sourceforge.net/ac\-archive/acx_lapack.html).


This module sets the following variables:


.nf
  LAPACK_FOUND \- set to true if a library implementing the LAPACK interface
    is found
  LAPACK_LINKER_FLAGS \- uncached list of required linker flags (excluding \-l
    and \-L).
  LAPACK_LIBRARIES \- uncached list of libraries (using full path name) to
    link against to use LAPACK
  LAPACK95_LIBRARIES \- uncached list of libraries (using full path name) to
    link against to use LAPACK95
  LAPACK95_FOUND \- set to true if a library implementing the LAPACK f95
    interface is found
  BLA_STATIC  if set on this determines what kind of linkage we do (static)
  BLA_VENDOR  if set checks only the specified vendor, if not set checks
     all the possibilities
  BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK
.fi

## List of vendors (BLA_VENDOR) valid in this module #  Intel(mkl), ACML,Apple, NAS, Generic

.TP
.B FindLATEX
Find Latex

This module finds if Latex is installed and determines where the executables are. This code sets the following variables:


.nf
  
  LATEX_COMPILER:       path to the LaTeX compiler
  PDFLATEX_COMPILER:    path to the PdfLaTeX compiler
  BIBTEX_COMPILER:      path to the BibTeX compiler
  MAKEINDEX_COMPILER:   path to the MakeIndex compiler
  DVIPS_CONVERTER:      path to the DVIPS converter
  PS2PDF_CONVERTER:     path to the PS2PDF converter
  LATEX2HTML_CONVERTER: path to the LaTeX2Html converter 
.fi




.TP
.B FindLibArchive
Find libarchive library and headers

The module defines the following variables:


.nf
  LibArchive_FOUND        \- true if libarchive was found
  LibArchive_INCLUDE_DIRS \- include search path
  LibArchive_LIBRARIES    \- libraries to link
  LibArchive_VERSION      \- libarchive 3\-component version number
.fi

.TP
.B FindLibXml2
Try to find the LibXml2 xml processing library

Once done this will define


.nf
  LIBXML2_FOUND \- System has LibXml2
  LIBXML2_INCLUDE_DIR \- The LibXml2 include directory
  LIBXML2_LIBRARIES \- The libraries needed to use LibXml2
  LIBXML2_DEFINITIONS \- Compiler switches required for using LibXml2
  LIBXML2_XMLLINT_EXECUTABLE \- The XML checking tool xmllint coming with LibXml2
.fi

.TP
.B FindLibXslt
Try to find the LibXslt library

Once done this will define


.nf
  LIBXSLT_FOUND \- system has LibXslt
  LIBXSLT_INCLUDE_DIR \- the LibXslt include directory
  LIBXSLT_LIBRARIES \- Link these to LibXslt
  LIBXSLT_DEFINITIONS \- Compiler switches required for using LibXslt
.fi

Additionally, the following two variables are set (but not required for using xslt):


.nf
  LIBXSLT_EXSLT_LIBRARIES \- Link to these if you need to link against the exslt library
  LIBXSLT_XSLTPROC_EXECUTABLE \- Contains the full path to the xsltproc executable if found
.fi

.TP
.B FindLua50
.nf
 
.fi

Locate Lua library This module defines


.nf
  LUA50_FOUND, if false, do not try to link to Lua 
  LUA_LIBRARIES, both lua and lualib
  LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h)
.fi




Note that the expected include convention is


.nf
  #include "lua.h"
.fi

and not


.nf
  #include <lua/lua.h>
.fi

This is because, the lua location is not standardized and may exist in locations other than lua/

.TP
.B FindLua51
.nf
 
.fi

Locate Lua library This module defines


.nf
  LUA51_FOUND, if false, do not try to link to Lua 
  LUA_LIBRARIES
  LUA_INCLUDE_DIR, where to find lua.h 
.fi




Note that the expected include convention is


.nf
  #include "lua.h"
.fi

and not


.nf
  #include <lua/lua.h>
.fi

This is because, the lua location is not standardized and may exist in locations other than lua/

.TP
.B FindMFC
Find MFC on Windows

Find the native MFC \- i.e. decide if an application can link to the MFC libraries.


.nf
  MFC_FOUND \- Was MFC support found
.fi

You don't need to include anything or link anything to use it.

.TP
.B FindMPEG
Find the native MPEG includes and library

This module defines


.nf
  MPEG_INCLUDE_DIR, where to find MPEG.h, etc.
  MPEG_LIBRARIES, the libraries required to use MPEG.
  MPEG_FOUND, If false, do not try to use MPEG.
.fi

also defined, but not for general use are


.nf
  MPEG_mpeg2_LIBRARY, where to find the MPEG library.
  MPEG_vo_LIBRARY, where to find the vo library.
.fi

.TP
.B FindMPEG2
Find the native MPEG2 includes and library

This module defines


.nf
  MPEG2_INCLUDE_DIR, path to mpeg2dec/mpeg2.h, etc.
  MPEG2_LIBRARIES, the libraries required to use MPEG2.
  MPEG2_FOUND, If false, do not try to use MPEG2.
.fi

also defined, but not for general use are


.nf
  MPEG2_mpeg2_LIBRARY, where to find the MPEG2 library.
  MPEG2_vo_LIBRARY, where to find the vo library.
.fi

.TP
.B FindMPI
Find a Message Passing Interface (MPI) implementation

The Message Passing Interface (MPI) is a library used to write high\-performance distributed\-memory parallel applications, and is typically deployed on a cluster. MPI is a standard interface (defined by the MPI forum) for which many implementations are available. All of them have somewhat different include paths, libraries to link against, etc., and this module tries to smooth out those differences.


=== Variables ===


This module will set the following variables per language in your project, where <lang> is one of C, CXX, or Fortran:


.nf
   MPI_<lang>_FOUND           TRUE if FindMPI found MPI flags for <lang>
   MPI_<lang>_COMPILER        MPI Compiler wrapper for <lang>
   MPI_<lang>_COMPILE_FLAGS   Compilation flags for MPI programs
   MPI_<lang>_INCLUDE_PATH    Include path(s) for MPI header
   MPI_<lang>_LINK_FLAGS      Linking flags for MPI programs
   MPI_<lang>_LIBRARIES       All libraries to link MPI programs against
.fi

Additionally, FindMPI sets the following variables for running MPI programs from the command line:


.nf
   MPIEXEC                    Executable for running MPI programs
   MPIEXEC_NUMPROC_FLAG       Flag to pass to MPIEXEC before giving
                              it the number of processors to run on
   MPIEXEC_PREFLAGS           Flags to pass to MPIEXEC directly
                              before the executable to run.
   MPIEXEC_POSTFLAGS          Flags to pass to MPIEXEC after other flags
.fi

=== Usage ===


To use this module, simply call FindMPI from a CMakeLists.txt file, or run find_package(MPI), then run CMake.  If you are happy with the auto\- detected configuration for your language, then you're done.  If not, you have two options:


.nf
   1. Set MPI_<lang>_COMPILER to the MPI wrapper (mpicc, etc.) of your
      choice and reconfigure.  FindMPI will attempt to determine all the
      necessary variables using THAT compiler's compile and link flags.
   2. If this fails, or if your MPI implementation does not come with
      a compiler wrapper, then set both MPI_<lang>_LIBRARIES and
      MPI_<lang>_INCLUDE_PATH.  You may also set any other variables
      listed above, but these two are required.  This will circumvent
      autodetection entirely.
.fi

When configuration is successful, MPI_<lang>_COMPILER will be set to the compiler wrapper for <lang>, if it was found.  MPI_<lang>_FOUND and other variables above will be set if any MPI implementation was found for <lang>, regardless of whether a compiler was found.


When using MPIEXEC to execute MPI applications, you should typically use all of the MPIEXEC flags as follows:


.nf
   ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS
     ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS
.fi

where PROCS is the number of processors on which to execute the program, EXECUTABLE is the MPI program, and ARGS are the arguments to pass to the MPI program.


=== Backward Compatibility ===


For backward compatibility with older versions of FindMPI, these variables are set, but deprecated:


.nf
   MPI_FOUND           MPI_COMPILER        MPI_LIBRARY
   MPI_COMPILE_FLAGS   MPI_INCLUDE_PATH    MPI_EXTRA_LIBRARY
   MPI_LINK_FLAGS      MPI_LIBRARIES
.fi

In new projects, please use the MPI_<lang>_XXX equivalents.

.TP
.B FindMatlab
this module looks for Matlab

Defines:


.nf
  MATLAB_INCLUDE_DIR: include path for mex.h, engine.h
  MATLAB_LIBRARIES:   required libraries: libmex, etc
  MATLAB_MEX_LIBRARY: path to libmex.lib
  MATLAB_MX_LIBRARY:  path to libmx.lib
  MATLAB_ENG_LIBRARY: path to libeng.lib
.fi

.TP
.B FindMotif
Try to find Motif (or lesstif)

Once done this will define:


.nf
  MOTIF_FOUND        \- system has MOTIF
  MOTIF_INCLUDE_DIR  \- include paths to use Motif
  MOTIF_LIBRARIES    \- Link these to use Motif
.fi

.TP
.B FindOpenAL
.nf
 
.fi

Locate OpenAL This module defines OPENAL_LIBRARY OPENAL_FOUND, if false, do not try to link to OpenAL  OPENAL_INCLUDE_DIR, where to find the headers


$OPENALDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OPENALDIR used in building OpenAL.


Created by Eric Wing. This was influenced by the FindSDL.cmake module.

.TP
.B FindOpenGL
Try to find OpenGL

Once done this will define


.nf
  
  OPENGL_FOUND        \- system has OpenGL
  OPENGL_XMESA_FOUND  \- system has XMESA
  OPENGL_GLU_FOUND    \- system has GLU
  OPENGL_INCLUDE_DIR  \- the GL include directory
  OPENGL_LIBRARIES    \- Link these to use OpenGL and GLU
   
.fi

If you want to use just GL you can use these values


.nf
  OPENGL_gl_LIBRARY   \- Path to OpenGL Library
  OPENGL_glu_LIBRARY  \- Path to GLU Library
  
.fi

On OSX default to using the framework version of opengl People will have to change the cache values of OPENGL_glu_LIBRARY  and OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX

.TP
.B FindOpenMP
Finds OpenMP support

This module can be used to detect OpenMP support in a compiler. If the compiler supports OpenMP, the flags required to compile with openmp support are set.  


The following variables are set:


.nf
   OpenMP_C_FLAGS \- flags to add to the C compiler for OpenMP support
   OpenMP_CXX_FLAGS \- flags to add to the CXX compiler for OpenMP support
   OPENMP_FOUND \- true if openmp is detected
.fi




Supported compilers can be found at http://openmp.org/wp/openmp\-compilers/

.TP
.B FindOpenSSL
Try to find the OpenSSL encryption library

Once done this will define


.nf
  OPENSSL_ROOT_DIR \- Set this variable to the root installation of OpenSSL
.fi




Read\-Only variables:


.nf
  OPENSSL_FOUND \- system has the OpenSSL library
  OPENSSL_INCLUDE_DIR \- the OpenSSL include directory
  OPENSSL_LIBRARIES \- The libraries needed to use OpenSSL
  OPENSSL_VERSION \- This is set to $major.$minor.$revision (eg. 0.9.8)
.fi

.TP
.B FindOpenSceneGraph
Find OpenSceneGraph

This module searches for the OpenSceneGraph core "osg" library as well as OpenThreads, and whatever additional COMPONENTS (nodekits) that you specify.


.nf
    See http://www.openscenegraph.org
.fi




NOTE: To use this module effectively you must either require CMake >= 2.6.3 with cmake_minimum_required(VERSION 2.6.3) or download and place FindOpenThreads.cmake, Findosg_functions.cmake, Findosg.cmake, and Find<etc>.cmake files into your CMAKE_MODULE_PATH.


==================================


This module accepts the following variables (note mixed case)


.nf
    OpenSceneGraph_DEBUG \- Enable debugging output
.fi




.nf
    OpenSceneGraph_MARK_AS_ADVANCED \- Mark cache variables as advanced 
                                      automatically
.fi




The following environment variables are also respected for finding the OSG and it's various components.  CMAKE_PREFIX_PATH can also be used for this (see find_library() CMake documentation).


.nf
    <MODULE>_DIR (where MODULE is of the form "OSGVOLUME" and there is a FindosgVolume.cmake file)
    OSG_DIR
    OSGDIR
    OSG_ROOT
.fi




This module defines the following output variables:


.nf
    OPENSCENEGRAPH_FOUND \- Was the OSG and all of the specified components found?
.fi




.nf
    OPENSCENEGRAPH_VERSION \- The version of the OSG which was found
.fi




.nf
    OPENSCENEGRAPH_INCLUDE_DIRS \- Where to find the headers
.fi




.nf
    OPENSCENEGRAPH_LIBRARIES \- The OSG libraries
.fi




================================== Example Usage:


.nf
  find_package(OpenSceneGraph 2.0.0 REQUIRED osgDB osgUtil)
      # libOpenThreads & libosg automatically searched
  include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
.fi




.nf
  add_executable(foo foo.cc)
  target_link_libraries(foo ${OPENSCENEGRAPH_LIBRARIES})
.fi




.TP
.B FindOpenThreads
.nf
 
.fi

OpenThreads is a C++ based threading library. Its largest userbase  seems to OpenSceneGraph so you might notice I accept OSGDIR as an environment path. I consider this part of the Findosg* suite used to find OpenSceneGraph  components. Each component is separate and you must opt in to each module.


Locate OpenThreads This module defines OPENTHREADS_LIBRARY OPENTHREADS_FOUND, if false, do not try to link to OpenThreads OPENTHREADS_INCLUDE_DIR, where to find the headers


$OPENTHREADS_DIR is an environment variable that would correspond to the ./configure \-\-prefix=$OPENTHREADS_DIR used in building osg.


Created by Eric Wing.

.TP
.B FindPHP4
Find PHP4

This module finds if PHP4 is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:


.nf
  PHP4_INCLUDE_PATH       = path to where php.h can be found
  PHP4_EXECUTABLE         = full path to the php4 binary
.fi




.TP
.B FindPNG
Find the native PNG includes and library




This module searches libpng, the library for working with PNG images.


It defines the following variables


.nf
  PNG_INCLUDE_DIRS, where to find png.h, etc.
  PNG_LIBRARIES, the libraries to link against to use PNG.
  PNG_DEFINITIONS \- You should add_definitons(${PNG_DEFINITIONS}) before compiling code that includes png library files.
  PNG_FOUND, If false, do not try to use PNG.
.fi

Also defined, but not for general use are


.nf
  PNG_LIBRARY, where to find the PNG library.
.fi

For backward compatiblity the variable PNG_INCLUDE_DIR is also set. It has the same value as PNG_INCLUDE_DIRS.


Since PNG depends on the ZLib compression library, none of the above will be defined unless ZLib can be found.

.TP
.B FindPackageHandleStandardArgs
.nf
 
.fi

FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )


This function is intended to be used in FindXXX.cmake modules files. It handles the REQUIRED, QUIET and version\-related arguments to FIND_PACKAGE(). It also sets the <UPPERCASED_NAME>_FOUND variable. The package is considered found if all variables <var1>... listed contain valid results, e.g. valid filepaths.


There are two modes of this function. The first argument in both modes is the name of the Find\-module where it is called (in original casing).


The first simple mode looks like this:


.nf
    FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
.fi

If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND will be set to TRUE. If DEFAULT_MSG is given as second argument, then the function will generate itself useful success and error messages. You can also supply a custom error message for the failure case. This is not recommended.


The second mode is more powerful and also supports version checking:


.nf
    FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
                                           [VERSION_VAR   <versionvar>
                                           [CONFIG_MODE]
                                           [FAIL_MESSAGE "Custom failure message"] )
.fi




As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND will be set to TRUE. After REQUIRED_VARS the variables which are required for this package are listed. Following VERSION_VAR the name of the variable can be specified which holds the version of the package which has been found. If this is done, this version will be checked against the (potentially) specified required version used in the find_package() call. The EXACT keyword is also handled. The default messages include information about the required version and the version which has been actually found, both if the version is ok or not. Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for a find_package(... NO_MODULE) call, in this case all the information provided by the config\-mode of find_package() will be evaluated automatically. Via FAIL_MESSAGE a custom failure message can be specified, if this is not used, the default message will be displayed.


Example for mode 1:


.nf
    FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
.fi




LibXml2 is considered to be found, if both LIBXML2_LIBRARY and LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE. If it is not found and REQUIRED was used, it fails with FATAL_ERROR, independent whether QUIET was used or not. If it is found, success will be reported, including the content of <var1>. On repeated Cmake runs, the same message won't be printed again.


Example for mode 2:


.nf
    FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
                                             VERSION_VAR BISON_VERSION)
.fi

In this case, BISON is considered to be found if the variable(s) listed after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case. Also the version of BISON will be checked by using the version contained in BISON_VERSION. Since no FAIL_MESSAGE is given, the default messages will be printed.


Another example for mode 2:


.nf
    FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
    FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4  CONFIG_MODE)
.fi

In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE) and adds an additional search directory for automoc4. The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper success/error message.

.TP
.B FindPackageMessage
.nf
 
.fi

FIND_PACKAGE_MESSAGE(<name> "message for user" "find result details")


This macro is intended to be used in FindXXX.cmake modules files. It will print a message once for each unique find result. This is useful for telling the user where a package was found. The first argument specifies the name (XXX) of the package. The second argument specifies the message to display. The third argument lists details about the find result so that if they change the message will be displayed again. The macro also obeys the QUIET argument to the find_package command.


Example:


.nf
  IF(X11_FOUND)
    FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
      "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
  ELSE(X11_FOUND)
   ...
  ENDIF(X11_FOUND)
.fi

.TP
.B FindPerl
Find perl

this module looks for Perl


.nf
  PERL_EXECUTABLE \- the full path to perl
  PERL_FOUND      \- If false, don't attempt to use perl.
.fi

.TP
.B FindPerlLibs
Find Perl libraries

This module finds if PERL is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:


.nf
  PERLLIBS_FOUND    = True if perl.h & libperl were found
  PERL_INCLUDE_PATH = path to where perl.h is found
  PERL_LIBRARY      = path to libperl
  PERL_EXECUTABLE   = full path to the perl binary
.fi




The minimum required version of Perl can be specified using the standard syntax, e.g. FIND_PACKAGE(PerlLibs 6.0)


.nf
  The following variables are also available if needed
  (introduced after CMake 2.6.4)
.fi




.nf
  PERL_SITESEARCH    = path to the sitesearch install dir
  PERL_SITELIB       = path to the sitelib install directory
  PERL_VENDORARCH    = path to the vendor arch install directory
  PERL_VENDORLIB     = path to the vendor lib install directory
  PERL_ARCHLIB       = path to the arch lib install directory
  PERL_PRIVLIB       = path to the priv lib install directory
  PERL_EXTRA_C_FLAGS = Compilation flags used to build perl
.fi




.TP
.B FindPhysFS
.nf
 
.fi

Locate PhysFS library This module defines PHYSFS_LIBRARY, the name of the library to link against PHYSFS_FOUND, if false, do not try to link to PHYSFS PHYSFS_INCLUDE_DIR, where to find physfs.h


$PHYSFSDIR is an environment variable that would correspond to the ./configure \-\-prefix=$PHYSFSDIR used in building PHYSFS.


Created by Eric Wing. 

.TP
.B FindPike
Find Pike

This module finds if PIKE is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:


.nf
  PIKE_INCLUDE_PATH       = path to where program.h is found
  PIKE_EXECUTABLE         = full path to the pike binary
.fi




.TP
.B FindPkgConfig
a pkg\-config module for CMake




Usage:


.nf
   pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
     checks for all the given modules
.fi




.nf
   pkg_search_module(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
     checks for given modules and uses the first working one
.fi




When the 'REQUIRED' argument was set, macros will fail with an error when module(s) could not be found


When the 'QUIET' argument is set, no status messages will be printed.


It sets the following variables:


.nf
   PKG_CONFIG_FOUND         ... true if pkg\-config works on the system
   PKG_CONFIG_EXECUTABLE    ... pathname of the pkg\-config program
   <PREFIX>_FOUND           ... set to 1 if module(s) exist
.fi




For the following variables two sets of values exist; first one is the common one and has the given PREFIX. The second set contains flags which are given out when pkgconfig was called with the '\-\-static' option.


.nf
   <XPREFIX>_LIBRARIES      ... only the libraries (w/o the '\-l')
   <XPREFIX>_LIBRARY_DIRS   ... the paths of the libraries (w/o the '\-L')
   <XPREFIX>_LDFLAGS        ... all required linker flags
   <XPREFIX>_LDFLAGS_OTHER  ... all other linker flags
   <XPREFIX>_INCLUDE_DIRS   ... the '\-I' preprocessor flags (w/o the '\-I')
   <XPREFIX>_CFLAGS         ... all required cflags
   <XPREFIX>_CFLAGS_OTHER   ... the other compiler flags
.fi




.nf
   <XPREFIX> = <PREFIX>        for common case
   <XPREFIX> = <PREFIX>_STATIC for static linking
.fi




There are some special variables whose prefix depends on the count of given modules. When there is only one module, <PREFIX> stays unchanged. When there are multiple modules, the prefix will be changed to <PREFIX>_<MODNAME>:


.nf
   <XPREFIX>_VERSION    ... version of the module
   <XPREFIX>_PREFIX     ... prefix\-directory of the module
   <XPREFIX>_INCLUDEDIR ... include\-dir of the module
   <XPREFIX>_LIBDIR     ... lib\-dir of the module
.fi




.nf
   <XPREFIX> = <PREFIX>  when |MODULES| == 1, else
   <XPREFIX> = <PREFIX>_<MODNAME>
.fi




A <MODULE> parameter can have the following formats:


.nf
   {MODNAME}            ... matches any version
   {MODNAME}>={VERSION} ... at least version <VERSION> is required
   {MODNAME}={VERSION}  ... exactly version <VERSION> is required
   {MODNAME}<={VERSION} ... modules must not be newer than <VERSION>
.fi




Examples


.nf
   pkg_check_modules (GLIB2   glib\-2.0)
.fi




.nf
   pkg_check_modules (GLIB2   glib\-2.0>=2.10)
     requires at least version 2.10 of glib2 and defines e.g.
       GLIB2_VERSION=2.10.3
.fi




.nf
   pkg_check_modules (FOO     glib\-2.0>=2.10 gtk+\-2.0)
     requires both glib2 and gtk2, and defines e.g.
       FOO_glib\-2.0_VERSION=2.10.3
       FOO_gtk+\-2.0_VERSION=2.8.20
.fi




.nf
   pkg_check_modules (XRENDER REQUIRED xrender)
     defines e.g.:
       XRENDER_LIBRARIES=Xrender;X11
       XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp
.fi




.nf
   pkg_search_module (BAR     libxml\-2.0 libxml2 libxml>=2)
.fi

.TP
.B FindPostgreSQL
Find the PostgreSQL installation.

Usage: In your CMakeLists.txt file do something like this: ... # PostgreSQL FIND_PACKAGE(PostgreSQL) ... if( PostgreSQL_FOUND )


.nf
   include_directories(${PostgreSQL_INCLUDE_DIRS})
.fi

endif( PostgreSQL_FOUND ) ... Remember to include ${PostgreSQL_LIBRARIES} in the target_link_libraries() statement.





In Windows, we make the assumption that, if the PostgreSQL files are installed, the default directory will be C:\\Program Files\\PostgreSQL.


.TP
.B FindProducer
.nf
 
.fi

Though Producer isn't directly part of OpenSceneGraph, its primary user is OSG so I consider this part of the Findosg* suite used to find  OpenSceneGraph components. You'll notice that I accept OSGDIR as an environment path.


Each component is separate and you must opt in to each module. You must  also opt into OpenGL (and OpenThreads?) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate Producer This module defines PRODUCER_LIBRARY PRODUCER_FOUND, if false, do not try to link to Producer PRODUCER_INCLUDE_DIR, where to find the headers


$PRODUCER_DIR is an environment variable that would correspond to the ./configure \-\-prefix=$PRODUCER_DIR used in building osg.


Created by Eric Wing.

.TP
.B FindProtobuf
.nf
 
.fi

Locate and configure the Google Protocol Buffers library.


The following variables can be set and are optional:


.nf
   PROTOBUF_SRC_ROOT_FOLDER \- When compiling with MSVC, if this cache variable is set
                              the protobuf\-default VS project build locations
                              (vsprojects/Debug & vsprojects/Release) will be searched
                              for libraries and binaries.
.fi




Defines the following variables:


.nf
   PROTOBUF_FOUND \- Found the Google Protocol Buffers library (libprotobuf & header files)
   PROTOBUF_INCLUDE_DIRS \- Include directories for Google Protocol Buffers
   PROTOBUF_LIBRARIES \- The protobuf libraries
.fi

[New in CMake 2.8.5]


.nf
   PROTOBUF_PROTOC_LIBRARIES \- The protoc libraries
   PROTOBUF_LITE_LIBRARIES \- The protobuf\-lite libraries
.fi




The following cache variables are also available to set or use:


.nf
   PROTOBUF_LIBRARY \- The protobuf library
   PROTOBUF_PROTOC_LIBRARY   \- The protoc library
   PROTOBUF_INCLUDE_DIR \- The include directory for protocol buffers
   PROTOBUF_PROTOC_EXECUTABLE \- The protoc compiler
.fi

[New in CMake 2.8.5]


.nf
   PROTOBUF_LIBRARY_DEBUG \- The protobuf library (debug)
   PROTOBUF_PROTOC_LIBRARY_DEBUG   \- The protoc library (debug)
   PROTOBUF_LITE_LIBRARY \- The protobuf lite library
   PROTOBUF_LITE_LIBRARY_DEBUG \- The protobuf lite library (debug)
.fi




.nf
  ====================================================================
  Example:
.fi




.nf
   find_package(Protobuf REQUIRED)
   include_directories(${PROTOBUF_INCLUDE_DIRS})
.fi




.nf
   include_directories(${CMAKE_CURRENT_BINARY_DIR})
   PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS foo.proto)
   add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
   target_link_libraries(bar ${PROTOBUF_LIBRARIES})
.fi




NOTE: You may need to link against pthreads, depending


.nf
       on the platform.
.fi




NOTE: The PROTOBUF_GENERATE_CPP macro & add_executable() or add_library()


.nf
       calls only work properly within the same directory.
.fi




.nf
  ====================================================================
.fi




PROTOBUF_GENERATE_CPP (public function)


.nf
   SRCS = Variable to define with autogenerated
          source files
   HDRS = Variable to define with autogenerated
          header files
   ARGN = proto files
.fi




.nf
  ====================================================================
.fi

.TP
.B FindPythonInterp
Find python interpreter

This module finds if Python interpreter is installed and determines where the executables are. This code sets the following variables:


.nf
  PYTHONINTERP_FOUND         \- Was the Python executable found
  PYTHON_EXECUTABLE          \- path to the Python interpreter
.fi




.nf
  PYTHON_VERSION_STRING      \- Python version found e.g. 2.5.2
  PYTHON_VERSION_MAJOR       \- Python major version found e.g. 2
  PYTHON_VERSION_MINOR       \- Python minor version found e.g. 5
  PYTHON_VERSION_PATCH       \- Python patch version found e.g. 2
.fi




.nf
  Python_ADDITIONAL_VERSIONS \- list of additional Python versions to search for
.fi

.TP
.B FindPythonLibs
Find python libraries

This module finds if Python is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:


.nf
  PYTHONLIBS_FOUND           \- have the Python libs been found
  PYTHON_LIBRARIES           \- path to the python library
  PYTHON_INCLUDE_PATH        \- path to where Python.h is found (deprecated)
  PYTHON_INCLUDE_DIRS        \- path to where Python.h is found
  PYTHON_DEBUG_LIBRARIES     \- path to the debug library
  Python_ADDITIONAL_VERSIONS \- list of additional Python versions to search for
.fi

.TP
.B FindQt
Searches for all installed versions of QT.

This should only be used if your project can work with multiple versions of QT.  If not, you should just directly use FindQt4 or FindQt3. If multiple versions of QT are found on the machine, then The user must set the option DESIRED_QT_VERSION to the version they want to use.  If only one version of qt is found on the machine, then the DESIRED_QT_VERSION is set to that version and the  matching FindQt3 or FindQt4 module is included. Once the user sets DESIRED_QT_VERSION, then the FindQt3 or FindQt4 module is included.


.nf
  QT_REQUIRED if this is set to TRUE then if CMake can 
              not find QT4 or QT3 an error is raised 
              and a message is sent to the user.
.fi




.nf
  DESIRED_QT_VERSION OPTION is created
  QT4_INSTALLED is set to TRUE if qt4 is found.
  QT3_INSTALLED is set to TRUE if qt3 is found.
.fi

.TP
.B FindQt3
Locate Qt include paths and libraries

This module defines:


.nf
  QT_INCLUDE_DIR \- where to find qt.h, etc.
  QT_LIBRARIES   \- the libraries to link against to use Qt.
  QT_DEFINITIONS \- definitions to use when
                   compiling code that uses Qt.
  QT_FOUND       \- If false, don't try to use Qt.
.fi




If you need the multithreaded version of Qt, set QT_MT_REQUIRED to TRUE


Also defined, but not for general use are:


.nf
  QT_MOC_EXECUTABLE, where to find the moc tool.
  QT_UIC_EXECUTABLE, where to find the uic tool.
  QT_QT_LIBRARY, where to find the Qt library.
  QT_QTMAIN_LIBRARY, where to find the qtmain
   library. This is only required by Qt3 on Windows.
.fi

.TP
.B FindQt4
Find QT 4

This module can be used to find Qt4. The most important issue is that the Qt4 qmake is available via the system path. This qmake is then used to detect basically everything else. This module defines a number of key variables and macros.  The variable QT_USE_FILE is set which is the path to a CMake file that can be included  to compile Qt 4 applications and libraries.  It sets up the compilation environment for include directories, preprocessor defines and populates a QT_LIBRARIES variable.


Typical usage could be something like:


.nf
   find_package(Qt4 4.4.3 REQUIRED QtCore QtGui QtXml)
   include(${QT_USE_FILE})
   add_executable(myexe main.cpp)
   target_link_libraries(myexe ${QT_LIBRARIES})
.fi




The minimum required version can be specified using the standard find_package()\-syntax (see example above).  For compatibility with older versions of FindQt4.cmake it is also possible to set the variable QT_MIN_VERSION to the minimum required version of Qt4 before the  find_package(Qt4) command.  If both are used, the version used in the find_package() command overrides the one from QT_MIN_VERSION.


When using the components argument, QT_USE_QT* variables are automatically set for the QT_USE_FILE to pick up.  If one wishes to manually set them, the available ones to set include:


.nf
                    QT_DONT_USE_QTCORE
                    QT_DONT_USE_QTGUI
                    QT_USE_QT3SUPPORT
                    QT_USE_QTASSISTANT
                    QT_USE_QAXCONTAINER
                    QT_USE_QAXSERVER
                    QT_USE_QTDESIGNER
                    QT_USE_QTMOTIF
                    QT_USE_QTMAIN
                    QT_USE_QTMULTIMEDIA
                    QT_USE_QTNETWORK
                    QT_USE_QTNSPLUGIN
                    QT_USE_QTOPENGL
                    QT_USE_QTSQL
                    QT_USE_QTXML
                    QT_USE_QTSVG
                    QT_USE_QTTEST
                    QT_USE_QTUITOOLS
                    QT_USE_QTDBUS
                    QT_USE_QTSCRIPT
                    QT_USE_QTASSISTANTCLIENT
                    QT_USE_QTHELP
                    QT_USE_QTWEBKIT
                    QT_USE_QTXMLPATTERNS
                    QT_USE_PHONON
                    QT_USE_QTSCRIPTTOOLS
                    QT_USE_QTDECLARATIVE
.fi




.nf
  QT_USE_IMPORTED_TARGETS 
        If this variable is set to TRUE, FindQt4.cmake will create imported
        library targets for the various Qt libraries and set the 
        library variables like QT_QTCORE_LIBRARY to point at these imported
        targets instead of the library file on disk. This provides much better 
        handling of the release and debug versions of the Qt libraries and is 
       also always backwards compatible, except for the case that dependencies
       of libraries are exported, these will then also list the names of the 
       imported targets as dependency and not the file location on disk. This
       is much more flexible, but requires that FindQt4.cmake is executed before
       such an exported dependency file is processed.
.fi




There are also some files that need processing by some Qt tools such as moc and uic.  Listed below are macros that may be used to process those files.


.nf
  
  macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
        create moc code from a list of files containing Qt class with
        the Q_OBJECT declaration.  Per\-direcotry preprocessor definitions 
        are also added.  Options may be given to moc, such as those found
        when executing "moc \-help".  
.fi




.nf
  macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
        create code from a list of Qt designer ui files.
        Options may be given to uic, such as those found
        when executing "uic \-help"
.fi




.nf
  macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...)
        create code from a list of Qt resource files.
        Options may be given to rcc, such as those found
        when executing "rcc \-help"
.fi




.nf
  macro QT4_GENERATE_MOC(inputfile outputfile )
        creates a rule to run moc on infile and create outfile.
        Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g.
        because you need a custom filename for the moc file or something similar.
.fi




.nf
  macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... )
        This macro is still experimental.
        It can be used to have moc automatically handled.
        So if you have the files foo.h and foo.cpp, and in foo.h a 
        a class uses the Q_OBJECT macro, moc has to run on it. If you don't
        want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert
        #include "foo.moc"
        in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the
        scan all listed files at cmake\-time for such included moc files and if it finds
        them cause a rule to be generated to run moc at build time on the 
        accompanying header file foo.h.
        If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro.
.fi




.nf
  macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
        create a the interface header and implementation files with the 
        given basename from the given interface xml file and add it to 
        the list of sources
.fi




.nf
  macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
        create the interface header and implementation files 
        for all listed interface xml files
        the name will be automatically determined from the name of the xml file
.fi




.nf
  macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
        create a dbus adaptor (header and implementation file) from the xml file
        describing the interface, and add it to the list of sources. The adaptor
        forwards the calls to a parent class, defined in parentheader and named
        parentclassname. The name of the generated files will be
        <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
        If <classname> is provided, then it will be used as the classname of the
        adaptor itself.
.fi




.nf
  macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...)
        generate the xml interface file from the given header.
        If the optional argument interfacename is omitted, the name of the 
        interface file is constructed from the basename of the header with
        the suffix .xml appended.
        Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml \-\-help"
.fi




.nf
  macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ... 
                                ts_files ... OPTIONS ...)
        out: qm_files
        in:  directories sources ts_files
        options: flags to pass to lupdate, such as \-extensions to specify
        extensions for a directory scan.
        generates commands to create .ts (vie lupdate) and .qm
        (via lrelease) \- files from directories and/or sources. The ts files are 
        created and/or updated in the source tree (unless given with full paths).
        The qm files are generated in the build tree.
        Updating the translations can be done by adding the qm_files
        to the source list of your library/executable, so they are
        always updated, or by adding a custom target to control when
        they get updated/generated.
.fi




.nf
  macro QT4_ADD_TRANSLATION( qm_files ts_files ... )
        out: qm_files
        in:  ts_files
        generates commands to create .qm from .ts \- files. The generated
        filenames can be found in qm_files. The ts_files
        must exists and are not updated in any way.
.fi







.nf
  Below is a detailed list of variables that FindQt4.cmake sets.
  QT_FOUND         If false, don't try to use Qt.
  QT4_FOUND        If false, don't try to use Qt 4.
.fi




.nf
  QT_VERSION_MAJOR The major version of Qt found.
  QT_VERSION_MINOR The minor version of Qt found.
  QT_VERSION_PATCH The patch version of Qt found.
.fi




.nf
  QT_EDITION               Set to the edition of Qt (i.e. DesktopLight)
  QT_EDITION_DESKTOPLIGHT  True if QT_EDITION == DesktopLight
  QT_QTCORE_FOUND          True if QtCore was found.
  QT_QTGUI_FOUND           True if QtGui was found.
  QT_QT3SUPPORT_FOUND      True if Qt3Support was found.
  QT_QTASSISTANT_FOUND     True if QtAssistant was found.
  QT_QTASSISTANTCLIENT_FOUND  True if QtAssistantClient was found.
  QT_QAXCONTAINER_FOUND    True if QAxContainer was found (Windows only).
  QT_QAXSERVER_FOUND       True if QAxServer was found (Windows only).
  QT_QTDBUS_FOUND          True if QtDBus was found.
  QT_QTDESIGNER_FOUND      True if QtDesigner was found.
  QT_QTDESIGNERCOMPONENTS  True if QtDesignerComponents was found.
  QT_QTHELP_FOUND          True if QtHelp was found.
  QT_QTMOTIF_FOUND         True if QtMotif was found.
  QT_QTMULTIMEDIA_FOUND    True if QtMultimedia was found (since Qt 4.6.0).
  QT_QTNETWORK_FOUND       True if QtNetwork was found.
  QT_QTNSPLUGIN_FOUND      True if QtNsPlugin was found.
  QT_QTOPENGL_FOUND        True if QtOpenGL was found.
  QT_QTSQL_FOUND           True if QtSql was found.
  QT_QTSVG_FOUND           True if QtSvg was found.
  QT_QTSCRIPT_FOUND        True if QtScript was found.
  QT_QTSCRIPTTOOLS_FOUND   True if QtScriptTools was found.
  QT_QTTEST_FOUND          True if QtTest was found.
  QT_QTUITOOLS_FOUND       True if QtUiTools was found.
  QT_QTWEBKIT_FOUND        True if QtWebKit was found.
  QT_QTXML_FOUND           True if QtXml was found.
  QT_QTXMLPATTERNS_FOUND   True if QtXmlPatterns was found.
  QT_PHONON_FOUND          True if phonon was found.
  QT_QTDECLARATIVE_FOUND   True if QtDeclarative was found.
.fi




.nf
  QT_MAC_USE_COCOA    For Mac OS X, its whether Cocoa or Carbon is used.
                      In general, this should not be used, but its useful
                      when having platform specific code.
.fi




.nf
  QT_DEFINITIONS   Definitions to use when compiling code that uses Qt.
                   You do not need to use this if you include QT_USE_FILE.
                   The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG
                   to fit your current build type.  Those are not contained
                   in QT_DEFINITIONS.
                  
  QT_INCLUDES      List of paths to all include directories of 
                   Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are
                   always in this variable even if NOTFOUND,
                   all other INCLUDE_DIRS are
                   only added if they are found.
                   You do not need to use this if you include QT_USE_FILE.
   
.fi




.nf
  Include directories for the Qt modules are listed here.
  You do not need to use these variables if you include QT_USE_FILE.
.fi




.nf
  QT_INCLUDE_DIR              Path to "include" of Qt4
  QT_QT3SUPPORT_INCLUDE_DIR   Path to "include/Qt3Support" 
  QT_QTASSISTANT_INCLUDE_DIR  Path to "include/QtAssistant" 
  QT_QTASSISTANTCLIENT_INCLUDE_DIR       Path to "include/QtAssistant"
  QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
  QT_QAXSERVER_INCLUDE_DIR    Path to "include/ActiveQt" (Windows only)
  QT_QTCORE_INCLUDE_DIR       Path to "include/QtCore"         
  QT_QTDBUS_INCLUDE_DIR       Path to "include/QtDBus" 
  QT_QTDESIGNER_INCLUDE_DIR   Path to "include/QtDesigner" 
  QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR   Path to "include/QtDesigner"
  QT_QTGUI_INCLUDE_DIR        Path to "include/QtGui" 
  QT_QTHELP_INCLUDE_DIR       Path to "include/QtHelp"
  QT_QTMOTIF_INCLUDE_DIR      Path to "include/QtMotif" 
  QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia" 
  QT_QTNETWORK_INCLUDE_DIR    Path to "include/QtNetwork" 
  QT_QTNSPLUGIN_INCLUDE_DIR   Path to "include/QtNsPlugin" 
  QT_QTOPENGL_INCLUDE_DIR     Path to "include/QtOpenGL" 
  QT_QTSCRIPT_INCLUDE_DIR     Path to "include/QtScript"
  QT_QTSQL_INCLUDE_DIR        Path to "include/QtSql" 
  QT_QTSVG_INCLUDE_DIR        Path to "include/QtSvg"
  QT_QTTEST_INCLUDE_DIR       Path to "include/QtTest"
  QT_QTWEBKIT_INCLUDE_DIR     Path to "include/QtWebKit"
  QT_QTXML_INCLUDE_DIR        Path to "include/QtXml" 
  QT_QTXMLPATTERNS_INCLUDE_DIR  Path to "include/QtXmlPatterns"
  QT_PHONON_INCLUDE_DIR       Path to "include/phonon"
  QT_QTSCRIPTTOOLS_INCLUDE_DIR       Path to "include/QtScriptTools"
  QT_QTDECLARATIVE_INCLUDE_DIR       Path to "include/QtDeclarative"
.fi




.nf
  QT_BINARY_DIR               Path to "bin" of Qt4
  QT_LIBRARY_DIR              Path to "lib" of Qt4
  QT_PLUGINS_DIR              Path to "plugins" for Qt4
  QT_TRANSLATIONS_DIR         Path to "translations" of Qt4
  QT_IMPORTS_DIR              Path to "imports" of Qt4
  QT_DOC_DIR                  Path to "doc" of Qt4
  QT_MKSPECS_DIR              Path to "mkspecs" of Qt4
.fi







The Qt toolkit may contain both debug and release libraries. In that case, the following library variables will contain both. You do not need to use these variables if you include QT_USE_FILE, and use QT_LIBRARIES.


.nf
  QT_QT3SUPPORT_LIBRARY            The Qt3Support library
  QT_QTASSISTANT_LIBRARY           The QtAssistant library
  QT_QTASSISTANTCLIENT_LIBRARY     The QtAssistantClient library
  QT_QAXCONTAINER_LIBRARY           The QAxContainer library (Windows only)
  QT_QAXSERVER_LIBRARY                The QAxServer library (Windows only)
  QT_QTCORE_LIBRARY                The QtCore library
  QT_QTDBUS_LIBRARY                The QtDBus library
  QT_QTDESIGNER_LIBRARY            The QtDesigner library
  QT_QTDESIGNERCOMPONENTS_LIBRARY  The QtDesignerComponents library
  QT_QTGUI_LIBRARY                 The QtGui library
  QT_QTHELP_LIBRARY                The QtHelp library
  QT_QTMOTIF_LIBRARY               The QtMotif library
  QT_QTMULTIMEDIA_LIBRARY          The QtMultimedia library
  QT_QTNETWORK_LIBRARY             The QtNetwork library
  QT_QTNSPLUGIN_LIBRARY            The QtNsPLugin library
  QT_QTOPENGL_LIBRARY              The QtOpenGL library
  QT_QTSCRIPT_LIBRARY              The QtScript library
  QT_QTSQL_LIBRARY                 The QtSql library
  QT_QTSVG_LIBRARY                 The QtSvg library
  QT_QTTEST_LIBRARY                The QtTest library
  QT_QTUITOOLS_LIBRARY             The QtUiTools library
  QT_QTWEBKIT_LIBRARY              The QtWebKit library
  QT_QTXML_LIBRARY                 The QtXml library
  QT_QTXMLPATTERNS_LIBRARY         The QtXmlPatterns library
  QT_QTMAIN_LIBRARY                The qtmain library for Windows
  QT_PHONON_LIBRARY                The phonon library
  QT_QTSCRIPTTOOLS_LIBRARY         The QtScriptTools library
  
.fi

The QtDeclarative library:             QT_QTDECLARATIVE_LIBRARY


also defined, but NOT for general use are


.nf
  QT_MOC_EXECUTABLE                   Where to find the moc tool.
  QT_UIC_EXECUTABLE                   Where to find the uic tool.
  QT_UIC3_EXECUTABLE                  Where to find the uic3 tool.
  QT_RCC_EXECUTABLE                   Where to find the rcc tool
  QT_DBUSCPP2XML_EXECUTABLE           Where to find the qdbuscpp2xml tool.
  QT_DBUSXML2CPP_EXECUTABLE           Where to find the qdbusxml2cpp tool.
  QT_LUPDATE_EXECUTABLE               Where to find the lupdate tool.
  QT_LRELEASE_EXECUTABLE              Where to find the lrelease tool.
  QT_QCOLLECTIONGENERATOR_EXECUTABLE  Where to find the qcollectiongenerator tool.
  QT_DESIGNER_EXECUTABLE              Where to find the Qt designer tool.
  QT_LINGUIST_EXECUTABLE              Where to find the Qt linguist tool.
  
.fi




These are around for backwards compatibility  they will be set


.nf
  QT_WRAP_CPP  Set true if QT_MOC_EXECUTABLE is found
  QT_WRAP_UI   Set true if QT_UIC_EXECUTABLE is found
  
.fi

These variables do _NOT_ have any effect anymore (compared to FindQt.cmake)


.nf
  QT_MT_REQUIRED         Qt4 is now always multithreaded
  
.fi

These variables are set to "" Because Qt structure changed  (They make no sense in Qt4)


.nf
  QT_QT_LIBRARY        Qt\-Library is now split
.fi

.TP
.B FindQuickTime
.nf
 
.fi

Locate QuickTime This module defines QUICKTIME_LIBRARY QUICKTIME_FOUND, if false, do not try to link to gdal  QUICKTIME_INCLUDE_DIR, where to find the headers


$QUICKTIME_DIR is an environment variable that would correspond to the ./configure \-\-prefix=$QUICKTIME_DIR


Created by Eric Wing. 

.TP
.B FindRTI
Try to find M&S HLA RTI libraries

This module finds if any HLA RTI is installed and locates the standard RTI include files and libraries.


RTI is a simulation infrastructure standardized by IEEE and SISO. It has a well defined C++ API that assures that simulation applications are independent on a particular RTI implementation.


.nf
  http://en.wikipedia.org/wiki/Run\-Time_Infrastructure_(simulation)
.fi




This code sets the following variables:


.nf
  RTI_INCLUDE_DIR = the directory where RTI includes file are found
  RTI_LIBRARIES = The libraries to link against to use RTI
  RTI_DEFINITIONS = \-DRTI_USES_STD_FSTREAM
  RTI_FOUND = Set to FALSE if any HLA RTI was not found
.fi




Report problems to <certi\-devel@nongnu.org>

.TP
.B FindRuby
Find Ruby

This module finds if Ruby is installed and determines where the include files and libraries are. Ruby 1.8 and 1.9 are supported.


The minimum required version of Ruby can be specified using the standard syntax, e.g. FIND_PACKAGE(Ruby 1.8)


It also determines what the name of the library is. This code sets the following variables:


.nf
  RUBY_EXECUTABLE   = full path to the ruby binary
  RUBY_INCLUDE_DIRS = include dirs to be used when using the ruby library
  RUBY_LIBRARY      = full path to the ruby library
  RUBY_VERSION      = the version of ruby which was found, e.g. "1.8.7"
  RUBY_FOUND        = set to true if ruby ws found successfully
.fi




.nf
  RUBY_INCLUDE_PATH = same as RUBY_INCLUDE_DIRS, only provided for compatibility reasons, don't use it
.fi

.TP
.B FindSDL
.nf
 
.fi

Locate SDL library This module defines SDL_LIBRARY, the name of the library to link against SDL_FOUND, if false, do not try to link to SDL SDL_INCLUDE_DIR, where to find SDL.h


This module responds to the the flag: SDL_BUILDING_LIBRARY If this is defined, then no SDL_main will be linked in because  only applications need main(). Otherwise, it is assumed you are building an application and this module will attempt to locate and set the the proper link flags as part of the returned SDL_LIBRARY variable.


Don't forget to include SDLmain.h and SDLmain.m your project for the  OS X framework based version. (Other versions link to \-lSDLmain which this module will try to find on your behalf.) Also for OS X, this  module will automatically add the \-framework Cocoa on your behalf.





Additional Note: If you see an empty SDL_LIBRARY_TEMP in your configuration and no SDL_LIBRARY, it means CMake did not find your SDL library  (SDL.dll, libsdl.so, SDL.framework, etc).  Set SDL_LIBRARY_TEMP to point to your SDL library, and configure again.  Similarly, if you see an empty SDLMAIN_LIBRARY, you should set this value as appropriate. These values are used to generate the final SDL_LIBRARY variable, but when these values are unset, SDL_LIBRARY does not get created.





$SDLDIR is an environment variable that would correspond to the ./configure \-\-prefix=$SDLDIR used in building SDL. l.e.galup  9\-20\-02


Modified by Eric Wing.  Added code to assist with automated building by using environmental variables and providing a more controlled/consistent search behavior. Added new modifications to recognize OS X frameworks and  additional Unix paths (FreeBSD, etc).  Also corrected the header search path to follow "proper" SDL guidelines. Added a search for SDLmain which is needed by some platforms. Added a search for threads which is needed by some platforms. Added needed compile switches for MinGW.


On OSX, this will prefer the Framework version (if found) over others. People will have to manually change the cache values of  SDL_LIBRARY to override this selection or set the CMake environment CMAKE_INCLUDE_PATH to modify the search paths.


Note that the header path has changed from SDL/SDL.h to just SDL.h This needed to change because "proper" SDL convention is #include "SDL.h", not <SDL/SDL.h>. This is done for portability reasons because not all systems place things in SDL/ (see FreeBSD).

.TP
.B FindSDL_image
.nf
 
.fi

Locate SDL_image library This module defines SDLIMAGE_LIBRARY, the name of the library to link against SDLIMAGE_FOUND, if false, do not try to link to SDL SDLIMAGE_INCLUDE_DIR, where to find SDL/SDL.h


$SDLDIR is an environment variable that would correspond to the ./configure \-\-prefix=$SDLDIR used in building SDL.


Created by Eric Wing. This was influenced by the FindSDL.cmake  module, but with modifications to recognize OS X frameworks and  additional Unix paths (FreeBSD, etc).

.TP
.B FindSDL_mixer
.nf
 
.fi

Locate SDL_mixer library This module defines SDLMIXER_LIBRARY, the name of the library to link against SDLMIXER_FOUND, if false, do not try to link to SDL SDLMIXER_INCLUDE_DIR, where to find SDL/SDL.h


$SDLDIR is an environment variable that would correspond to the ./configure \-\-prefix=$SDLDIR used in building SDL.


Created by Eric Wing. This was influenced by the FindSDL.cmake  module, but with modifications to recognize OS X frameworks and  additional Unix paths (FreeBSD, etc).

.TP
.B FindSDL_net
.nf
 
.fi

Locate SDL_net library This module defines SDLNET_LIBRARY, the name of the library to link against SDLNET_FOUND, if false, do not try to link against SDLNET_INCLUDE_DIR, where to find the headers


$SDLDIR is an environment variable that would correspond to the ./configure \-\-prefix=$SDLDIR used in building SDL.


Created by Eric Wing. This was influenced by the FindSDL.cmake  module, but with modifications to recognize OS X frameworks and  additional Unix paths (FreeBSD, etc).

.TP
.B FindSDL_sound
.nf
 
.fi

Locates the SDL_sound library

.TP
.B FindSDL_ttf
.nf
 
.fi

Locate SDL_ttf library This module defines SDLTTF_LIBRARY, the name of the library to link against SDLTTF_FOUND, if false, do not try to link to SDL SDLTTF_INCLUDE_DIR, where to find SDL/SDL.h


$SDLDIR is an environment variable that would correspond to the ./configure \-\-prefix=$SDLDIR used in building SDL.


Created by Eric Wing. This was influenced by the FindSDL.cmake  module, but with modifications to recognize OS X frameworks and  additional Unix paths (FreeBSD, etc).

.TP
.B FindSWIG
Find SWIG

This module finds an installed SWIG.  It sets the following variables:


.nf
  SWIG_FOUND \- set to true if SWIG is found
  SWIG_DIR \- the directory where swig is installed
  SWIG_EXECUTABLE \- the path to the swig executable
  SWIG_VERSION   \- the version number of the swig executable
.fi




The minimum required version of SWIG can be specified using the standard syntax, e.g. FIND_PACKAGE(SWIG 1.1)


All information is collected from the SWIG_EXECUTABLE so the version to be found can be changed from the command line by means of setting SWIG_EXECUTABLE


.TP
.B FindSelfPackers
Find upx

This module looks for some executable packers (i.e. softwares that compress executables or shared libs into on\-the\-fly self\-extracting executables or shared libs. Examples:


.nf
  UPX: http://wildsau.idv.uni\-linz.ac.at/mfx/upx.html
.fi

.TP
.B FindSquish
\-\- Typical Use




This module can be used to find Squish (currently support is aimed at version 3).


.nf
  SQUISH_FOUND                    If false, don't try to use Squish
.fi




.nf
  SQUISH_INSTALL_DIR              The Squish installation directory (containing bin, lib, etc)
  SQUISH_SERVER_EXECUTABLE        The squishserver executable
  SQUISH_CLIENT_EXECUTABLE        The squishrunner executable
.fi




.nf
  SQUISH_INSTALL_DIR_FOUND        Was the install directory found?
  SQUISH_SERVER_EXECUTABLE_FOUND  Was the server executable found?
  SQUISH_CLIENT_EXECUTABLE_FOUND  Was the client executable found?
.fi




macro SQUISH_ADD_TEST(testName applicationUnderTest testSuite testCase)


.nf
  ENABLE_TESTING()
  FIND_PACKAGE(Squish)
  IF (SQUISH_FOUND)
    SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
  ENDIF (SQUISH_FOUND)
.fi




.TP
.B FindSubversion
Extract information from a subversion working copy

The module defines the following variables:


.nf
  Subversion_SVN_EXECUTABLE \- path to svn command line client
  Subversion_VERSION_SVN \- version of svn command line client
  Subversion_FOUND \- true if the command line client was found
  SUBVERSION_FOUND \- same as Subversion_FOUND, set for compatiblity reasons
.fi




The minimum required version of Subversion can be specified using the standard syntax, e.g. FIND_PACKAGE(Subversion 1.4)


If the command line client executable is found two macros are defined:


.nf
  Subversion_WC_INFO(<dir> <var\-prefix>)
  Subversion_WC_LOG(<dir> <var\-prefix>)
.fi

Subversion_WC_INFO extracts information of a subversion working copy at a given location. This macro defines the following variables:


.nf
  <var\-prefix>_WC_URL \- url of the repository (at <dir>)
  <var\-prefix>_WC_ROOT \- root url of the repository
  <var\-prefix>_WC_REVISION \- current revision
  <var\-prefix>_WC_LAST_CHANGED_AUTHOR \- author of last commit
  <var\-prefix>_WC_LAST_CHANGED_DATE \- date of last commit
  <var\-prefix>_WC_LAST_CHANGED_REV \- revision of last commit
  <var\-prefix>_WC_INFO \- output of command `svn info <dir>'
.fi

Subversion_WC_LOG retrieves the log message of the base revision of a subversion working copy at a given location. This macro defines the variable:


.nf
  <var\-prefix>_LAST_CHANGED_LOG \- last log of base revision
.fi

Example usage:


.nf
  FIND_PACKAGE(Subversion)
  IF(SUBVERSION_FOUND)
    Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
    MESSAGE("Current revision is ${Project_WC_REVISION}")
    Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
    MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
  ENDIF(SUBVERSION_FOUND)
.fi

.TP
.B FindTCL
TK_INTERNAL_PATH was removed.

This module finds if Tcl is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:


.nf
  TCL_FOUND              = Tcl was found
  TK_FOUND               = Tk was found
  TCLTK_FOUND            = Tcl and Tk were found
  TCL_LIBRARY            = path to Tcl library (tcl tcl80)
  TCL_INCLUDE_PATH       = path to where tcl.h can be found
  TCL_TCLSH              = path to tclsh binary (tcl tcl80)
  TK_LIBRARY             = path to Tk library (tk tk80 etc)
  TK_INCLUDE_PATH        = path to where tk.h can be found
  TK_WISH                = full path to the wish executable
.fi




In an effort to remove some clutter and clear up some issues for people who are not necessarily Tcl/Tk gurus/developpers, some variables were moved or removed. Changes compared to CMake 2.4 are:


.nf
   => they were only useful for people writing Tcl/Tk extensions.
   => these libs are not packaged by default with Tcl/Tk distributions. 
      Even when Tcl/Tk is built from source, several flavors of debug libs
      are created and there is no real reason to pick a single one
      specifically (say, amongst tcl84g, tcl84gs, or tcl84sgx). 
      Let's leave that choice to the user by allowing him to assign 
      TCL_LIBRARY to any Tcl library, debug or not.
   => this ended up being only a Win32 variable, and there is a lot of
      confusion regarding the location of this file in an installed Tcl/Tk
      tree anyway (see 8.5 for example). If you need the internal path at
      this point it is safer you ask directly where the *source* tree is
      and dig from there.
.fi

.TP
.B FindTIFF
Find TIFF library

Find the native TIFF includes and library This module defines


.nf
  TIFF_INCLUDE_DIR, where to find tiff.h, etc.
  TIFF_LIBRARIES, libraries to link against to use TIFF.
  TIFF_FOUND, If false, do not try to use TIFF.
.fi

also defined, but not for general use are


.nf
  TIFF_LIBRARY, where to find the TIFF library.
.fi

.TP
.B FindTclStub
TCL_STUB_LIBRARY_DEBUG and TK_STUB_LIBRARY_DEBUG were removed.

This module finds Tcl stub libraries. It first finds Tcl include files and libraries by calling FindTCL.cmake. How to Use the Tcl Stubs Library:


.nf
   http://tcl.activestate.com/doc/howto/stubs.html
.fi

Using Stub Libraries:


.nf
   http://safari.oreilly.com/0130385603/ch48lev1sec3
.fi

This code sets the following variables:


.nf
  TCL_STUB_LIBRARY       = path to Tcl stub library
  TK_STUB_LIBRARY        = path to Tk stub library
  TTK_STUB_LIBRARY       = path to ttk stub library
.fi




In an effort to remove some clutter and clear up some issues for people who are not necessarily Tcl/Tk gurus/developpers, some variables were moved or removed. Changes compared to CMake 2.4 are:


.nf
   => these libs are not packaged by default with Tcl/Tk distributions. 
      Even when Tcl/Tk is built from source, several flavors of debug libs
      are created and there is no real reason to pick a single one
      specifically (say, amongst tclstub84g, tclstub84gs, or tclstub84sgx). 
      Let's leave that choice to the user by allowing him to assign 
      TCL_STUB_LIBRARY to any Tcl library, debug or not.
.fi

.TP
.B FindTclsh
Find tclsh

This module finds if TCL is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:


.nf
  TCLSH_FOUND = TRUE if tclsh has been found
  TCL_TCLSH = the path to the tclsh executable
.fi

In cygwin, look for the cygwin version first.  Don't look for it later to avoid finding the cygwin version on a Win32 build.

.TP
.B FindThreads
This module determines the thread library of the system.

The following variables are set


.nf
  CMAKE_THREAD_LIBS_INIT     \- the thread library
  CMAKE_USE_SPROC_INIT       \- are we using sproc?
  CMAKE_USE_WIN32_THREADS_INIT \- using WIN32 threads?
  CMAKE_USE_PTHREADS_INIT    \- are we using pthreads
  CMAKE_HP_PTHREADS_INIT     \- are we using hp pthreads
.fi

For systems with multiple thread libraries, caller can set


.nf
  CMAKE_THREAD_PREFER_PTHREAD
.fi

.TP
.B FindUnixCommands
Find unix commands from cygwin

This module looks for some usual Unix commands.


.TP
.B FindVTK
Find a VTK installation or build tree.

The following variables are set if VTK is found.  If VTK is not found, VTK_FOUND is set to false.


.nf
  VTK_FOUND         \- Set to true when VTK is found.
  VTK_USE_FILE      \- CMake file to use VTK.
  VTK_MAJOR_VERSION \- The VTK major version number.
  VTK_MINOR_VERSION \- The VTK minor version number 
                       (odd non\-release).
  VTK_BUILD_VERSION \- The VTK patch level 
                       (meaningless for odd minor).
  VTK_INCLUDE_DIRS  \- Include directories for VTK
  VTK_LIBRARY_DIRS  \- Link directories for VTK libraries
  VTK_KITS          \- List of VTK kits, in CAPS 
                      (COMMON,IO,) etc.
  VTK_LANGUAGES     \- List of wrapped languages, in CAPS
                      (TCL, PYHTON,) etc.
.fi

The following cache entries must be set by the user to locate VTK:


.nf
  VTK_DIR  \- The directory containing VTKConfig.cmake.  
             This is either the root of the build tree,
             or the lib/vtk directory.  This is the 
             only cache entry.
.fi

The following variables are set for backward compatibility and should not be used in new code:


.nf
  USE_VTK_FILE \- The full path to the UseVTK.cmake file.
                 This is provided for backward 
                 compatibility.  Use VTK_USE_FILE 
                 instead.
.fi




.TP
.B FindWget
Find wget

This module looks for wget. This module defines the  following values:


.nf
  WGET_EXECUTABLE: the full path to the wget tool.
  WGET_FOUND: True if wget has been found.
.fi

.TP
.B FindWish
Find wish installation

This module finds if TCL is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:


.nf
  TK_WISH = the path to the wish executable
.fi




if UNIX is defined, then it will look for the cygwin version first

.TP
.B FindX11
Find X11 installation

Try to find X11 on UNIX systems. The following values are defined


.nf
  X11_FOUND        \- True if X11 is available
  X11_INCLUDE_DIR  \- include directories to use X11
  X11_LIBRARIES    \- link against these to use X11
.fi




and also the following more fine grained variables: Include paths: X11_ICE_INCLUDE_PATH,          X11_ICE_LIB,        X11_ICE_FOUND


.nf
                X11_SM_INCLUDE_PATH,           X11_SM_LIB,         X11_SM_FOUND
                X11_X11_INCLUDE_PATH,          X11_X11_LIB
                X11_Xaccessrules_INCLUDE_PATH,                     X11_Xaccess_FOUND
                X11_Xaccessstr_INCLUDE_PATH,                       X11_Xaccess_FOUND
                X11_Xau_INCLUDE_PATH,          X11_Xau_LIB,        X11_Xau_FOUND
                X11_Xcomposite_INCLUDE_PATH,   X11_Xcomposite_LIB, X11_Xcomposite_FOUND
                X11_Xcursor_INCLUDE_PATH,      X11_Xcursor_LIB,    X11_Xcursor_FOUND
                X11_Xdamage_INCLUDE_PATH,      X11_Xdamage_LIB,    X11_Xdamage_FOUND
                X11_Xdmcp_INCLUDE_PATH,        X11_Xdmcp_LIB,      X11_Xdmcp_FOUND
                                               X11_Xext_LIB,       X11_Xext_FOUND
                X11_dpms_INCLUDE_PATH,         (in X11_Xext_LIB),  X11_dpms_FOUND
                X11_XShm_INCLUDE_PATH,         (in X11_Xext_LIB),  X11_XShm_FOUND
                X11_Xshape_INCLUDE_PATH,       (in X11_Xext_LIB),  X11_Xshape_FOUND
                X11_xf86misc_INCLUDE_PATH,     X11_Xxf86misc_LIB,  X11_xf86misc_FOUND
                X11_xf86vmode_INCLUDE_PATH,                        X11_xf86vmode_FOUND
                X11_Xfixes_INCLUDE_PATH,       X11_Xfixes_LIB,     X11_Xfixes_FOUND
                X11_Xft_INCLUDE_PATH,          X11_Xft_LIB,        X11_Xft_FOUND
                X11_Xi_INCLUDE_PATH,           X11_Xi_LIB,         X11_Xi_FOUND
                X11_Xinerama_INCLUDE_PATH,     X11_Xinerama_LIB,   X11_Xinerama_FOUND
                X11_Xinput_INCLUDE_PATH,       X11_Xinput_LIB,     X11_Xinput_FOUND
                X11_Xkb_INCLUDE_PATH,                              X11_Xkb_FOUND
                X11_Xkblib_INCLUDE_PATH,                           X11_Xkb_FOUND
                X11_Xkbfile_INCLUDE_PATH,      X11_Xkbfile_LIB,    X11_Xkbfile_FOUND
                X11_Xpm_INCLUDE_PATH,          X11_Xpm_LIB,        X11_Xpm_FOUND
                X11_XTest_INCLUDE_PATH,        X11_XTest_LIB,      X11_XTest_FOUND
                X11_Xrandr_INCLUDE_PATH,       X11_Xrandr_LIB,     X11_Xrandr_FOUND
                X11_Xrender_INCLUDE_PATH,      X11_Xrender_LIB,    X11_Xrender_FOUND
                X11_Xscreensaver_INCLUDE_PATH, X11_Xscreensaver_LIB, X11_Xscreensaver_FOUND
                X11_Xt_INCLUDE_PATH,           X11_Xt_LIB,         X11_Xt_FOUND
                X11_Xutil_INCLUDE_PATH,                            X11_Xutil_FOUND
                X11_Xv_INCLUDE_PATH,           X11_Xv_LIB,         X11_Xv_FOUND
                X11_XSync_INCLUDE_PATH,        (in X11_Xext_LIB),  X11_XSync_FOUND
.fi

.TP
.B FindXMLRPC
Find xmlrpc

Find the native XMLRPC headers and libraries.


.nf
  XMLRPC_INCLUDE_DIRS      \- where to find xmlrpc.h, etc.
  XMLRPC_LIBRARIES         \- List of libraries when using xmlrpc.
  XMLRPC_FOUND             \- True if xmlrpc found.
.fi

XMLRPC modules may be specified as components for this find module. Modules may be listed by running "xmlrpc\-c\-config".  Modules include:


.nf
  c++            C++ wrapper code
  libwww\-client  libwww\-based client
  cgi\-server     CGI\-based server
  abyss\-server   ABYSS\-based server
.fi

Typical usage:


.nf
  FIND_PACKAGE(XMLRPC REQUIRED libwww\-client)
.fi

.TP
.B FindZLIB
Find zlib

Find the native ZLIB includes and library. Once done this will define


.nf
  ZLIB_INCLUDE_DIRS   \- where to find zlib.h, etc.
  ZLIB_LIBRARIES      \- List of libraries when using zlib.
  ZLIB_FOUND          \- True if zlib found.
.fi




.nf
  ZLIB_VERSION_STRING \- The version of zlib found (x.y.z)
  ZLIB_VERSION_MAJOR  \- The major version of zlib
  ZLIB_VERSION_MINOR  \- The minor version of zlib
  ZLIB_VERSION_PATCH  \- The patch version of zlib
  ZLIB_VERSION_TWEAK  \- The tweak version of zlib
.fi




The following variable are provided for backward compatibility


.nf
  ZLIB_MAJOR_VERSION  \- The major version of zlib
  ZLIB_MINOR_VERSION  \- The minor version of zlib
  ZLIB_PATCH_VERSION  \- The patch version of zlib
.fi




An includer may set ZLIB_ROOT to a zlib installation root to tell this module where to look.

.TP
.B Findosg
.nf
 
.fi




NOTE: It is highly recommended that you use the new FindOpenSceneGraph.cmake introduced in CMake 2.6.3 and not use this Find module directly.


This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osg This module defines


OSG_FOUND \- Was the Osg found? OSG_INCLUDE_DIR \- Where to find the headers OSG_LIBRARIES \- The libraries to link against for the OSG (use this)


OSG_LIBRARY \- The OSG library OSG_LIBRARY_DEBUG \- The OSG debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgAnimation
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgAnimation This module defines


OSGANIMATION_FOUND \- Was osgAnimation found? OSGANIMATION_INCLUDE_DIR \- Where to find the headers OSGANIMATION_LIBRARIES \- The libraries to link against for the OSG (use this)


OSGANIMATION_LIBRARY \- The OSG library OSGANIMATION_LIBRARY_DEBUG \- The OSG debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgDB
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgDB This module defines


OSGDB_FOUND \- Was osgDB found? OSGDB_INCLUDE_DIR \- Where to find the headers OSGDB_LIBRARIES \- The libraries to link against for the osgDB (use this)


OSGDB_LIBRARY \- The osgDB library OSGDB_LIBRARY_DEBUG \- The osgDB debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgFX
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgFX This module defines


OSGFX_FOUND \- Was osgFX found? OSGFX_INCLUDE_DIR \- Where to find the headers OSGFX_LIBRARIES \- The libraries to link against for the osgFX (use this)


OSGFX_LIBRARY \- The osgFX library OSGFX_LIBRARY_DEBUG \- The osgFX debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgGA
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgGA This module defines


OSGGA_FOUND \- Was osgGA found? OSGGA_INCLUDE_DIR \- Where to find the headers OSGGA_LIBRARIES \- The libraries to link against for the osgGA (use this)


OSGGA_LIBRARY \- The osgGA library OSGGA_LIBRARY_DEBUG \- The osgGA debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgIntrospection
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgINTROSPECTION This module defines


OSGINTROSPECTION_FOUND \- Was osgIntrospection found? OSGINTROSPECTION_INCLUDE_DIR \- Where to find the headers OSGINTROSPECTION_LIBRARIES \- The libraries to link for osgIntrospection (use this)


OSGINTROSPECTION_LIBRARY \- The osgIntrospection library OSGINTROSPECTION_LIBRARY_DEBUG \- The osgIntrospection debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgManipulator
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgManipulator This module defines


OSGMANIPULATOR_FOUND \- Was osgManipulator found? OSGMANIPULATOR_INCLUDE_DIR \- Where to find the headers OSGMANIPULATOR_LIBRARIES \- The libraries to link for osgManipulator (use this)


OSGMANIPULATOR_LIBRARY \- The osgManipulator library OSGMANIPULATOR_LIBRARY_DEBUG \- The osgManipulator debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgParticle
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgParticle This module defines


OSGPARTICLE_FOUND \- Was osgParticle found? OSGPARTICLE_INCLUDE_DIR \- Where to find the headers OSGPARTICLE_LIBRARIES \- The libraries to link for osgParticle (use this)


OSGPARTICLE_LIBRARY \- The osgParticle library OSGPARTICLE_LIBRARY_DEBUG \- The osgParticle debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgProducer
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgProducer This module defines


OSGPRODUCER_FOUND \- Was osgProducer found? OSGPRODUCER_INCLUDE_DIR \- Where to find the headers OSGPRODUCER_LIBRARIES \- The libraries to link for osgProducer (use this)


OSGPRODUCER_LIBRARY \- The osgProducer library OSGPRODUCER_LIBRARY_DEBUG \- The osgProducer debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgShadow
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgShadow This module defines


OSGSHADOW_FOUND \- Was osgShadow found? OSGSHADOW_INCLUDE_DIR \- Where to find the headers OSGSHADOW_LIBRARIES \- The libraries to link for osgShadow (use this)


OSGSHADOW_LIBRARY \- The osgShadow library OSGSHADOW_LIBRARY_DEBUG \- The osgShadow debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgSim
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgSim This module defines


OSGSIM_FOUND \- Was osgSim found? OSGSIM_INCLUDE_DIR \- Where to find the headers OSGSIM_LIBRARIES \- The libraries to link for osgSim (use this)


OSGSIM_LIBRARY \- The osgSim library OSGSIM_LIBRARY_DEBUG \- The osgSim debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgTerrain
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgTerrain This module defines


OSGTERRAIN_FOUND \- Was osgTerrain found? OSGTERRAIN_INCLUDE_DIR \- Where to find the headers OSGTERRAIN_LIBRARIES \- The libraries to link for osgTerrain (use this)


OSGTERRAIN_LIBRARY \- The osgTerrain library OSGTERRAIN_LIBRARY_DEBUG \- The osgTerrain debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgText
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgText This module defines


OSGTEXT_FOUND \- Was osgText found? OSGTEXT_INCLUDE_DIR \- Where to find the headers OSGTEXT_LIBRARIES \- The libraries to link for osgText (use this)


OSGTEXT_LIBRARY \- The osgText library OSGTEXT_LIBRARY_DEBUG \- The osgText debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgUtil
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgUtil This module defines


OSGUTIL_FOUND \- Was osgUtil found? OSGUTIL_INCLUDE_DIR \- Where to find the headers OSGUTIL_LIBRARIES \- The libraries to link for osgUtil (use this)


OSGUTIL_LIBRARY \- The osgUtil library OSGUTIL_LIBRARY_DEBUG \- The osgUtil debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgViewer
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgViewer This module defines


OSGVIEWER_FOUND \- Was osgViewer found? OSGVIEWER_INCLUDE_DIR \- Where to find the headers OSGVIEWER_LIBRARIES \- The libraries to link for osgViewer (use this)


OSGVIEWER_LIBRARY \- The osgViewer library OSGVIEWER_LIBRARY_DEBUG \- The osgViewer debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgVolume
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgVolume This module defines


OSGVOLUME_FOUND \- Was osgVolume found? OSGVOLUME_INCLUDE_DIR \- Where to find the headers OSGVOLUME_LIBRARIES \- The libraries to link for osgVolume (use this)


OSGVOLUME_LIBRARY \- The osgVolume library OSGVOLUME_LIBRARY_DEBUG \- The osgVolume debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


Created by Eric Wing.

.TP
.B FindosgWidget
.nf
 
.fi

This is part of the Findosg* suite used to find OpenSceneGraph components. Each component is separate and you must opt in to each module. You must  also opt into OpenGL and OpenThreads (and Producer if needed) as these  modules won't do it for you. This is to allow you control over your own  system piece by piece in case you need to opt out of certain components or change the Find behavior for a particular module (perhaps because the default FindOpenGL.cmake module doesn't work with your system as an example). If you want to use a more convenient module that includes everything, use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.


Locate osgWidget This module defines


OSGWIDGET_FOUND \- Was osgWidget found? OSGWIDGET_INCLUDE_DIR \- Where to find the headers OSGWIDGET_LIBRARIES \- The libraries to link for osgWidget (use this)


OSGWIDGET_LIBRARY \- The osgWidget library OSGWIDGET_LIBRARY_DEBUG \- The osgWidget debug library


$OSGDIR is an environment variable that would correspond to the ./configure \-\-prefix=$OSGDIR used in building osg.


FindosgWidget.cmake tweaked from Findosg* suite as created by Eric Wing.

.TP
.B Findosg_functions
.nf
 
.fi




This CMake file contains two macros to assist with searching for OSG libraries and nodekits.


.TP
.B FindwxWidgets
Find a wxWidgets (a.k.a., wxWindows) installation.

This module finds if wxWidgets is installed and selects a default configuration to use. wxWidgets is a modular library. To specify the modules that you will use, you need to name them as components to the package:


FIND_PACKAGE(wxWidgets COMPONENTS core base ...)


There are two search branches: a windows style and a unix style. For windows, the following variables are searched for and set to defaults in case of multiple choices. Change them if the defaults are not desired (i.e., these are the only variables you should change to select a configuration):


.nf
  wxWidgets_ROOT_DIR      \- Base wxWidgets directory
                            (e.g., C:/wxWidgets\-2.6.3).
  wxWidgets_LIB_DIR       \- Path to wxWidgets libraries
                            (e.g., C:/wxWidgets\-2.6.3/lib/vc_lib).
  wxWidgets_CONFIGURATION \- Configuration to use
                            (e.g., msw, mswd, mswu, mswunivud, etc.)
  wxWidgets_EXCLUDE_COMMON_LIBRARIES
                          \- Set to TRUE to exclude linking of
                            commonly required libs (e.g., png tiff
                            jpeg zlib regex expat).
.fi




For unix style it uses the wx\-config utility. You can select between debug/release, unicode/ansi, universal/non\-universal, and static/shared in the QtDialog or ccmake interfaces by turning ON/OFF the following variables:


.nf
  wxWidgets_USE_DEBUG
  wxWidgets_USE_UNICODE
  wxWidgets_USE_UNIVERSAL
  wxWidgets_USE_STATIC
.fi




There is also a wxWidgets_CONFIG_OPTIONS variable for all other options that need to be passed to the wx\-config utility. For example, to use the base toolkit found in the /usr/local path, set the variable (before calling the FIND_PACKAGE command) as such:


.nf
  SET(wxWidgets_CONFIG_OPTIONS \-\-toolkit=base \-\-prefix=/usr)
.fi




The following are set after the configuration is done for both windows and unix style:


.nf
  wxWidgets_FOUND            \- Set to TRUE if wxWidgets was found.
  wxWidgets_INCLUDE_DIRS     \- Include directories for WIN32
                               i.e., where to find "wx/wx.h" and
                               "wx/setup.h"; possibly empty for unices.
  wxWidgets_LIBRARIES        \- Path to the wxWidgets libraries.
  wxWidgets_LIBRARY_DIRS     \- compile time link dirs, useful for
                               rpath on UNIX. Typically an empty string
                               in WIN32 environment.
  wxWidgets_DEFINITIONS      \- Contains defines required to compile/link
                               against WX, e.g. WXUSINGDLL
  wxWidgets_DEFINITIONS_DEBUG\- Contains defines required to compile/link
                               against WX debug builds, e.g. __WXDEBUG__
  wxWidgets_CXX_FLAGS        \- Include dirs and compiler flags for
                               unices, empty on WIN32. Essentially
                               "`wx\-config \-\-cxxflags`".
  wxWidgets_USE_FILE         \- Convenience include file.
.fi




Sample usage:


.nf
   # Note that for MinGW users the order of libs is important!
   FIND_PACKAGE(wxWidgets COMPONENTS net gl core base)
   IF(wxWidgets_FOUND)
     INCLUDE(${wxWidgets_USE_FILE})
     # and for each of your dependent executable/library targets:
     TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
   ENDIF(wxWidgets_FOUND)
.fi




If wxWidgets is required (i.e., not an optional part):


.nf
   FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
   INCLUDE(${wxWidgets_USE_FILE})
   # and for each of your dependent executable/library targets:
   TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
.fi

.TP
.B FindwxWindows
Find wxWindows (wxWidgets) installation

This module finds if wxWindows/wxWidgets is installed and determines where the include files and libraries are. It also determines what the name of the library is. Please note this file is DEPRECATED and replaced by FindwxWidgets.cmake. This code sets the following variables:


.nf
  WXWINDOWS_FOUND     = system has WxWindows
  WXWINDOWS_LIBRARIES = path to the wxWindows libraries
                        on Unix/Linux with additional
                        linker flags from
                        "wx\-config \-\-libs"
  CMAKE_WXWINDOWS_CXX_FLAGS  = Compiler flags for wxWindows,
                               essentially "`wx\-config \-\-cxxflags`"
                               on Linux
  WXWINDOWS_INCLUDE_DIR      = where to find "wx/wx.h" and "wx/setup.h"
  WXWINDOWS_LINK_DIRECTORIES = link directories, useful for rpath on
                                Unix
  WXWINDOWS_DEFINITIONS      = extra defines
.fi




OPTIONS If you need OpenGL support please


.nf
  SET(WXWINDOWS_USE_GL 1)
.fi

in your CMakeLists.txt *before* you include this file.


.nf
  HAVE_ISYSTEM      \- true required to replace \-I by \-isystem on g++
.fi




For convenience include Use_wxWindows.cmake in your project's CMakeLists.txt using INCLUDE(Use_wxWindows).


USAGE


.nf
  SET(WXWINDOWS_USE_GL 1)
  FIND_PACKAGE(wxWindows)
.fi




NOTES wxWidgets 2.6.x is supported for monolithic builds e.g. compiled  in wx/build/msw dir as:


.nf
  nmake \-f makefile.vc BUILD=debug SHARED=0 USE_OPENGL=1 MONOLITHIC=1
.fi




DEPRECATED


.nf
  CMAKE_WX_CAN_COMPILE
  WXWINDOWS_LIBRARY
  CMAKE_WX_CXX_FLAGS
  WXWINDOWS_INCLUDE_PATH
.fi




AUTHOR Jan Woetzel <http://www.mip.informatik.uni\-kiel.de/~jw> (07/2003\-01/2006)

.TP
.B FortranCInterface
Fortran/C Interface Detection

This module automatically detects the API by which C and Fortran languages interact.  Variables indicate if the mangling is found:


.nf
   FortranCInterface_GLOBAL_FOUND = Global subroutines and functions
   FortranCInterface_MODULE_FOUND = Module subroutines and functions
                                    (declared by "MODULE PROCEDURE")
.fi

A function is provided to generate a C header file containing macros to mangle symbol names:


.nf
   FortranCInterface_HEADER(<file>
                            [MACRO_NAMESPACE <macro\-ns>]
                            [SYMBOL_NAMESPACE <ns>]
                            [SYMBOLS [<module>:]<function> ...])
.fi

It generates in <file> definitions of the following macros:


.nf
   #define FortranCInterface_GLOBAL (name,NAME) ...
   #define FortranCInterface_GLOBAL_(name,NAME) ...
   #define FortranCInterface_MODULE (mod,name, MOD,NAME) ...
   #define FortranCInterface_MODULE_(mod,name, MOD,NAME) ...
.fi

These macros mangle four categories of Fortran symbols, respectively:


.nf
   \- Global symbols without '_': call mysub()
   \- Global symbols with '_'   : call my_sub()
   \- Module symbols without '_': use mymod; call mysub()
   \- Module symbols with '_'   : use mymod; call my_sub()
.fi

If mangling for a category is not known, its macro is left undefined. All macros require raw names in both lower case and upper case. The MACRO_NAMESPACE option replaces the default "FortranCInterface_" prefix with a given namespace "<macro\-ns>".


The SYMBOLS option lists symbols to mangle automatically with C preprocessor definitions:


.nf
   <function>          ==> #define <ns><function> ...
   <module>:<function> ==> #define <ns><module>_<function> ...
.fi

If the mangling for some symbol is not known then no preprocessor definition is created, and a warning is displayed. The SYMBOL_NAMESPACE option prefixes all preprocessor definitions generated by the SYMBOLS option with a given namespace "<ns>".


Example usage:


.nf
   include(FortranCInterface)
   FortranCInterface_HEADER(FC.h MACRO_NAMESPACE "FC_")
.fi

This creates a "FC.h" header that defines mangling macros FC_GLOBAL(), FC_GLOBAL_(), FC_MODULE(), and FC_MODULE_().


Example usage:


.nf
   include(FortranCInterface)
   FortranCInterface_HEADER(FCMangle.h
                            MACRO_NAMESPACE "FC_"
                            SYMBOL_NAMESPACE "FC_"
                            SYMBOLS mysub mymod:my_sub)
.fi

This creates a "FCMangle.h" header that defines the same FC_*() mangling macros as the previous example plus preprocessor symbols FC_mysub and FC_mymod_my_sub.


Another function is provided to verify that the Fortran and C/C++ compilers work together:


.nf
   FortranCInterface_VERIFY([CXX] [QUIET])
.fi

It tests whether a simple test executable using Fortran and C (and C++ when the CXX option is given) compiles and links successfully. The result is stored in the cache entry FortranCInterface_VERIFIED_C (or FortranCInterface_VERIFIED_CXX if CXX is given) as a boolean. If the check fails and QUIET is not given the function terminates with a FATAL_ERROR message describing the problem.  The purpose of this check is to stop a build early for incompatible compiler combinations.


FortranCInterface is aware of possible GLOBAL and MODULE manglings for many Fortran compilers, but it also provides an interface to specify new possible manglings.  Set the variables


.nf
   FortranCInterface_GLOBAL_SYMBOLS
   FortranCInterface_MODULE_SYMBOLS
.fi

before including FortranCInterface to specify manglings of the symbols "MySub", "My_Sub", "MyModule:MySub", and "My_Module:My_Sub". For example, the code:


.nf
   set(FortranCInterface_GLOBAL_SYMBOLS mysub_ my_sub__ MYSUB_)
     #                                  ^^^^^  ^^^^^^   ^^^^^
   set(FortranCInterface_MODULE_SYMBOLS
       __mymodule_MOD_mysub __my_module_MOD_my_sub)
     #   ^^^^^^^^     ^^^^^   ^^^^^^^^^     ^^^^^^
   include(FortranCInterface)
.fi

tells FortranCInterface to try given GLOBAL and MODULE manglings. (The carets point at raw symbol names for clarity in this example but are not needed.)

.TP
.B GNUInstallDirs
Define GNU standard installation directories

Provides install directory variables as defined for GNU software:


.nf
  http://www.gnu.org/prep/standards/html_node/Directory\-Variables.html
.fi

Inclusion of this module defines the following variables:


.nf
  CMAKE_INSTALL_<dir>      \- destination for files of a given type
  CMAKE_INSTALL_FULL_<dir> \- corresponding absolute path
.fi

where <dir> is one of:


.nf
  BINDIR           \- user executables (bin)
  SBINDIR          \- system admin executables (sbin)
  LIBEXECDIR       \- program executables (libexec)
  SYSCONFDIR       \- read\-only single\-machine data (etc)
  SHAREDSTATEDIR   \- modifiable architecture\-independent data (com)
  LOCALSTATEDIR    \- modifiable single\-machine data (var)
  LIBDIR           \- object code libraries (lib or lib64)
  INCLUDEDIR       \- C header files (include)
  OLDINCLUDEDIR    \- C header files for non\-gcc (/usr/include)
  DATAROOTDIR      \- read\-only architecture\-independent data root (share)
  DATADIR          \- read\-only architecture\-independent data (DATAROOTDIR)
  INFODIR          \- info documentation (DATAROOTDIR/info)
  LOCALEDIR        \- locale\-dependent data (DATAROOTDIR/locale)
  MANDIR           \- man documentation (DATAROOTDIR/man)
  DOCDIR           \- documentation root (DATAROOTDIR/doc/PROJECT_NAME)
.fi

Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of install() commands for the corresponding file type.  If the includer does not define a value the above\-shown default will be used and the value will appear in the cache for editing by the user. Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed from the corresponding destination by prepending (if necessary) the value of CMAKE_INSTALL_PREFIX.

.TP
.B GenerateExportHeader
Function for generation of export macros for libraries

This module provides the function GENERATE_EXPORT_HEADER() and the accompanying ADD_COMPILER_EXPORT_FLAGS() function.


The GENERATE_EXPORT_HEADER function can be used to generate a file suitable for preprocessor inclusion which contains EXPORT macros to be used in library classes.


GENERATE_EXPORT_HEADER( LIBRARY_TARGET


.nf
             [BASE_NAME <base_name>]
             [EXPORT_MACRO_NAME <export_macro_name>]
             [EXPORT_FILE_NAME <export_file_name>]
             [DEPRECATED_MACRO_NAME <deprecated_macro_name>]
             [NO_EXPORT_MACRO_NAME <no_export_macro_name>]
             [STATIC_DEFINE <static_define>]
             [NO_DEPRECATED_MACRO_NAME <no_deprecated_macro_name>]
             [DEFINE_NO_DEPRECATED]
             [PREFIX_NAME <prefix_name>]
.fi

)


ADD_COMPILER_EXPORT_FLAGS( [FATAL_WARNINGS] )


By default GENERATE_EXPORT_HEADER() generates macro names in a file name determined by the name of the library. The ADD_COMPILER_EXPORT_FLAGS function adds \-fvisibility=hidden to CMAKE_CXX_FLAGS if supported, and is a no\-op on Windows which does not need extra compiler flags for exporting support. You may optionally pass a single argument to ADD_COMPILER_EXPORT_FLAGS that will be populated with the required CXX_FLAGS required to enable visibility support for the compiler/architecture in use.


This means that in the simplest case, users of these functions will be equivalent to:


.nf
   add_compiler_export_flags()
   add_library(somelib someclass.cpp)
   generate_export_header(somelib)
   install(TARGETS somelib DESTINATION ${LIBRARY_INSTALL_DIR})
   install(FILES
    someclass.h
    ${PROJECT_BINARY_DIR}/somelib_export.h DESTINATION ${INCLUDE_INSTALL_DIR}
   )
.fi




And in the ABI header files:


.nf
   #include "somelib_export.h"
   class SOMELIB_EXPORT SomeClass {
     ...
   };
.fi




The CMake fragment will generate a file in the ${CMAKE_CURRENT_BUILD_DIR} called somelib_export.h containing the macros SOMELIB_EXPORT, SOMELIB_NO_EXPORT, SOMELIB_DEPRECATED, SOMELIB_DEPRECATED_EXPORT and SOMELIB_DEPRECATED_NO_EXPORT. The resulting file should be installed with other headers in the library.


The BASE_NAME argument can be used to override the file name and the names used for the macros


.nf
   add_library(somelib someclass.cpp)
   generate_export_header(somelib
     BASE_NAME other_name
   )
.fi




Generates a file called other_name_export.h containing the macros OTHER_NAME_EXPORT, OTHER_NAME_NO_EXPORT and OTHER_NAME_DEPRECATED etc.


The BASE_NAME may be overridden by specifiying other options in the function. For example:


.nf
   add_library(somelib someclass.cpp)
   generate_export_header(somelib
     EXPORT_MACRO_NAME OTHER_NAME_EXPORT
   )
.fi




creates the macro OTHER_NAME_EXPORT instead of SOMELIB_EXPORT, but other macros and the generated file name is as default.


.nf
   add_library(somelib someclass.cpp)
   generate_export_header(somelib
     DEPRECATED_MACRO_NAME KDE_DEPRECATED
   )
.fi




creates the macro KDE_DEPRECATED instead of SOMELIB_DEPRECATED.


If LIBRARY_TARGET is a static library, macros are defined without values.


If the same sources are used to create both a shared and a static library, the uppercased symbol ${BASE_NAME}_STATIC_DEFINE should be used when building the static library


.nf
   add_library(shared_variant SHARED ${lib_SRCS})
   add_library(static_variant ${lib_SRCS})
   generate_export_header(shared_variant BASE_NAME libshared_and_static)
   set_target_properties(static_variant PROPERTIES
     COMPILE_FLAGS \-DLIBSHARED_AND_STATIC_STATIC_DEFINE)
.fi




This will cause the export macros to expand to nothing when building the static library.


If DEFINE_NO_DEPRECATED is specified, then a macro ${BASE_NAME}_NO_DEPRECATED will be defined This macro can be used to remove deprecated code from preprocessor output.


.nf
   option(EXCLUDE_DEPRECATED "Exclude deprecated parts of the library" FALSE)
   if (EXCLUDE_DEPRECATED)
     set(NO_BUILD_DEPRECATED DEFINE_NO_DEPRECATED)
   endif()
   generate_export_header(somelib ${NO_BUILD_DEPRECATED})
.fi




And then in somelib:


.nf
   class SOMELIB_EXPORT SomeClass
   {
   public:
   #ifndef SOMELIB_NO_DEPRECATED
     SOMELIB_DEPRECATED void oldMethod();
   #endif
   };
.fi




.nf
   #ifndef SOMELIB_NO_DEPRECATED
   void SomeClass::oldMethod() {  }
   #endif
.fi




If PREFIX_NAME is specified, the argument will be used as a prefix to all generated macros.


For example:


.nf
   generate_export_header(somelib PREFIX_NAME VTK_)
.fi




Generates the macros VTK_SOMELIB_EXPORT etc.

.TP
.B GetPrerequisites
Functions to analyze and list executable file prerequisites.

This module provides functions to list the .dll, .dylib or .so files that an executable or shared library file depends on. (Its prerequisites.)


It uses various tools to obtain the list of required shared library files:


.nf
   dumpbin (Windows)
   ldd (Linux/Unix)
   otool (Mac OSX)
.fi

The following functions are provided by this module:


.nf
   get_prerequisites
   list_prerequisites
   list_prerequisites_by_glob
   gp_append_unique
   is_file_executable
   gp_item_default_embedded_path
     (projects can override with gp_item_default_embedded_path_override)
   gp_resolve_item
     (projects can override with gp_resolve_item_override)
   gp_resolved_file_type
     (projects can override with gp_resolved_file_type_override)
   gp_file_type
.fi

Requires CMake 2.6 or greater because it uses function, break, return and PARENT_SCOPE.


.nf
  GET_PREREQUISITES(<target> <prerequisites_var> <exclude_system> <recurse>
                    <exepath> <dirs>)
.fi

Get the list of shared library files required by <target>. The list in the variable named <prerequisites_var> should be empty on first entry to this function. On exit, <prerequisites_var> will contain the list of required shared library files.


<target> is the full path to an executable file. <prerequisites_var> is the name of a CMake variable to contain the results. <exclude_system> must be 0 or 1 indicating whether to include or exclude "system" prerequisites. If <recurse> is set to 1 all prerequisites will be found recursively, if set to 0 only direct prerequisites are listed. <exepath> is the path to the top level executable used for @executable_path replacment on the Mac. <dirs> is a list of paths where libraries might be found: these paths are searched first when a target without any path info is given. Then standard system locations are also searched: PATH, Framework locations, /usr/lib...


.nf
  LIST_PREREQUISITES(<target> [<recurse> [<exclude_system> [<verbose>]]])
.fi

Print a message listing the prerequisites of <target>.


<target> is the name of a shared library or executable target or the full path to a shared library or executable file. If <recurse> is set to 1 all prerequisites will be found recursively, if set to 0 only direct prerequisites are listed. <exclude_system> must be 0 or 1 indicating whether to include or exclude "system" prerequisites. With <verbose> set to 0 only the full path names of the prerequisites are printed, set to 1 extra informatin will be displayed.


.nf
  LIST_PREREQUISITES_BY_GLOB(<glob_arg> <glob_exp>)
.fi

Print the prerequisites of shared library and executable files matching a globbing pattern. <glob_arg> is GLOB or GLOB_RECURSE and <glob_exp> is a globbing expression used with "file(GLOB" or "file(GLOB_RECURSE" to retrieve a list of matching files. If a matching file is executable, its prerequisites are listed.


Any additional (optional) arguments provided are passed along as the optional arguments to the list_prerequisites calls.


.nf
  GP_APPEND_UNIQUE(<list_var> <value>)
.fi

Append <value> to the list variable <list_var> only if the value is not already in the list.


.nf
  IS_FILE_EXECUTABLE(<file> <result_var>)
.fi

Return 1 in <result_var> if <file> is a binary executable, 0 otherwise.


.nf
  GP_ITEM_DEFAULT_EMBEDDED_PATH(<item> <default_embedded_path_var>)
.fi

Return the path that others should refer to the item by when the item is embedded inside a bundle.


Override on a per\-project basis by providing a project\-specific gp_item_default_embedded_path_override function.


.nf
  GP_RESOLVE_ITEM(<context> <item> <exepath> <dirs> <resolved_item_var>)
.fi

Resolve an item into an existing full path file.


Override on a per\-project basis by providing a project\-specific gp_resolve_item_override function.


.nf
  GP_RESOLVED_FILE_TYPE(<original_file> <file> <exepath> <dirs> <type_var>)
.fi

Return the type of <file> with respect to <original_file>. String describing type of prerequisite is returned in variable named <type_var>.


Use <exepath> and <dirs> if necessary to resolve non\-absolute <file> values \-\- but only for non\-embedded items.


Possible types are:


.nf
   system
   local
   embedded
   other
.fi

Override on a per\-project basis by providing a project\-specific gp_resolved_file_type_override function.


.nf
  GP_FILE_TYPE(<original_file> <file> <type_var>)
.fi

Return the type of <file> with respect to <original_file>. String describing type of prerequisite is returned in variable named <type_var>.


Possible types are:


.nf
   system
   local
   embedded
   other
.fi

.TP
.B InstallRequiredSystemLibraries
.nf
 
.fi

By including this file, all library files listed in the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS will be installed with INSTALL(PROGRAMS ...) into bin for WIN32 and lib for non\-WIN32. If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP is set to TRUE before including this file, then the INSTALL command is not called. The user can use the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a custom install command and install them however they want. If it is the MSVC compiler, then the microsoft run time libraries will be found and automatically added to the CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS, and installed. If CMAKE_INSTALL_DEBUG_LIBRARIES is set and it is the MSVC compiler, then the debug libraries are installed when available. If CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY is set then only the debug libraries are installed when both debug and release are available. If CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time libraries are installed as well as the CRT run time libraries. If CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION is set then the libraries are installed to that directory rather than the default. If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is NOT set, then this file warns about required files that do not exist. You can set this variable to ON before including this file to avoid the warning. For example, the Visual Studio Express editions do not include the redistributable files, so if you include this file on a machine with only VS Express installed, you'll get the warning.

.TP
.B MacroAddFileDependencies
MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...)

Using the macro MACRO_ADD_FILE_DEPENDENCIES() is discouraged. There are usually better ways to specify the correct dependencies.


MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...) is just a convenience  wrapper around the OBJECT_DEPENDS source file property. You can just use SET_PROPERTY(SOURCE <file> APPEND PROPERTY OBJECT_DEPENDS depend_files) instead.

.TP
.B ProcessorCount
ProcessorCount(var)

Determine the number of processors/cores and save value in ${var}


Sets the variable named ${var} to the number of physical cores available on the machine if the information can be determined. Otherwise it is set to 0. Currently this functionality is implemented for AIX, cygwin, FreeBSD, HPUX, IRIX, Linux, Mac OS X, QNX, Sun and Windows.


This function is guaranteed to return a positive integer (>=1) if it succeeds. It returns 0 if there's a problem determining the processor count.


Example use, in a ctest \-S dashboard script:


.nf
   include(ProcessorCount)
   ProcessorCount(N)
   if(NOT N EQUAL 0)
     set(CTEST_BUILD_FLAGS \-j${N})
     set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
   endif()
.fi




This function is intended to offer an approximation of the value of the number of compute cores available on the current machine, such that you may use that value for parallel building and parallel testing. It is meant to help utilize as much of the machine as seems reasonable. Of course, knowledge of what else might be running on the machine simultaneously should be used when deciding whether to request a machine's full capacity all for yourself.

.TP
.B Qt4ConfigDependentSettings
.nf
 
.fi

This file is included by FindQt4.cmake, don't include it directly.

.TP
.B Qt4Macros
.nf
 
.fi

This file is included by FindQt4.cmake, don't include it directly.

.TP
.B SelectLibraryConfigurations
.nf
 
.fi

select_library_configurations( basename )


This macro takes a library base name as an argument, and will choose good values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE depending on what has been found and set.  If only basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE will be set to the release value.  If only basename_LIBRARY_DEBUG is defined, then basename_LIBRARY, basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.  


If the generator supports configuration types, then basename_LIBRARY and basename_LIBRARIES will be set with debug and optimized flags specifying the library to be used for the given configuration.  If no build type has been set or the generator in use does not support configuration types, then basename_LIBRARY and basename_LIBRARIES will take only the release values.

.TP
.B SquishTestScript
.nf
 
.fi




This script launches a GUI test using Squish.  You should not call the script directly; instead, you should access it via the SQUISH_ADD_TEST macro that is defined in FindSquish.cmake.


This script starts the Squish server, launches the test on the client, and finally stops the squish server.  If any of these steps fail (including if the tests do not pass) then a fatal error is raised.


.TP
.B TestBigEndian
Define macro to determine endian type

Check if the system is big endian or little endian


.nf
  TEST_BIG_ENDIAN(VARIABLE)
  VARIABLE \- variable to store the result to
.fi




.TP
.B TestCXXAcceptsFlag
Test CXX compiler for a flag

Check if the CXX compiler accepts a flag


.nf
  Macro CHECK_CXX_ACCEPTS_FLAG(FLAGS VARIABLE) \-
     checks if the function exists
  FLAGS \- the flags to try
  VARIABLE \- variable to store the result
.fi




.TP
.B TestForANSIForScope
Check for ANSI for scope support

Check if the compiler restricts the scope of variables declared in a for\-init\-statement to the loop body.


.nf
  CMAKE_NO_ANSI_FOR_SCOPE \- holds result
.fi




.TP
.B TestForANSIStreamHeaders
Test for compiler support of ANSI stream headers iostream, etc.

check if the compiler supports the standard ANSI iostream header (without the .h)


.nf
  CMAKE_NO_ANSI_STREAM_HEADERS \- defined by the results
.fi




.TP
.B TestForSSTREAM
Test for compiler support of ANSI sstream header

check if the compiler supports the standard ANSI sstream header


.nf
  CMAKE_NO_ANSI_STRING_STREAM \- defined by the results
.fi




.TP
.B TestForSTDNamespace
Test for std:: namespace support

check if the compiler supports std:: on stl classes


.nf
  CMAKE_NO_STD_NAMESPACE \- defined by the results
.fi




.TP
.B UseEcos
This module defines variables and macros required to build eCos application.

This file contains the following macros: ECOS_ADD_INCLUDE_DIRECTORIES() \- add the eCos include dirs ECOS_ADD_EXECUTABLE(name source1 ... sourceN ) \- create an eCos executable ECOS_ADJUST_DIRECTORY(VAR source1 ... sourceN ) \- adjusts the path of the source files and puts the result into VAR


Macros for selecting the toolchain: ECOS_USE_ARM_ELF_TOOLS()       \- enable the ARM ELF toolchain for the directory where it is called ECOS_USE_I386_ELF_TOOLS()      \- enable the i386 ELF toolchain for the directory where it is called ECOS_USE_PPC_EABI_TOOLS()      \- enable the PowerPC toolchain for the directory where it is called


It contains the following variables: ECOS_DEFINITIONS ECOSCONFIG_EXECUTABLE ECOS_CONFIG_FILE               \- defaults to ecos.ecc, if your eCos configuration file has a different name, adjust this variable for internal use only:


.nf
  ECOS_ADD_TARGET_LIB
.fi

.TP
.B UseJava
Use Module for Java

This file provides functions for Java. It is assumed that FindJava.cmake has already been loaded.  See FindJava.cmake for information on how to load Java into your CMake project.


add_jar(TARGET_NAME SRC1 SRC2 .. SRCN RCS1 RCS2 .. RCSN)


This command creates a <TARGET_NAME>.jar. It compiles the given source files (SRC) and adds the given resource files (RCS) to the jar file. If only resource files are given then just a jar file is created.


Additional instructions:


.nf
   To add compile flags to the target you can set these flags with
   the following variable:
.fi




.nf
       set(CMAKE_JAVA_COMPILE_FLAGS \-nowarn)
.fi




.nf
   To add a path or a jar file to the class path you can do this
   with the CMAKE_JAVA_INCLUDE_PATH variable.
.fi




.nf
       set(CMAKE_JAVA_INCLUDE_PATH /usr/share/java/shibboleet.jar)
.fi




.nf
   To use a different output name for the target you can set it with:
.fi




.nf
       set(CMAKE_JAVA_TARGET_OUTPUT_NAME shibboleet.jar)
       add_jar(foobar foobar.java)
.fi




.nf
   To add a VERSION to the target output name you can set it using
   CMAKE_JAVA_TARGET_VERSION. This will create a jar file with the name
   shibboleet\-1.0.0.jar and will create a symlink shibboleet.jar
   pointing to the jar with the version information.
.fi




.nf
       set(CMAKE_JAVA_TARGET_VERSION 1.2.0)
       add_jar(shibboleet shibbotleet.java)
.fi




.nf
    If the target is a JNI library, utilize the following commands to
    create a JNI symbolic link:
.fi




.nf
       set(CMAKE_JNI_TARGET TRUE)
       set(CMAKE_JAVA_TARGET_VERSION 1.2.0)
       add_jar(shibboleet shibbotleet.java)
       install_jar(shibboleet ${LIB_INSTALL_DIR}/shibboleet)
       install_jni_symlink(shibboleet ${JAVA_LIB_INSTALL_DIR})
.fi




.nf
    If a single target needs to produce more than one jar from its
    java source code, to prevent the accumulation of duplicate class
    files in subsequent jars, set/reset CMAKE_JAR_CLASSES_PREFIX prior
    to calling the add_jar() function:
.fi




.nf
       set(CMAKE_JAR_CLASSES_PREFIX com/redhat/foo)
       add_jar(foo foo.java)
.fi




.nf
       set(CMAKE_JAR_CLASSES_PREFIX com/redhat/bar)
       add_jar(bar bar.java)
.fi




Target Properties:


.nf
   The add_jar() functions sets some target properties. You can get these
   properties with the
      get_property(TARGET <target_name> PROPERTY <propery_name>)
   command.
.fi




.nf
   INSTALL_FILES      The files which should be installed. This is used by
                      install_jar().
   JNI_SYMLINK        The JNI symlink which should be installed.
                      This is used by install_jni_symlink().
   JAR_FILE           The location of the jar file so that you can include
                      it.
   CLASS_DIR          The directory where the class files can be found. For
                      example to use them with javah.
.fi




find_jar(<VAR>


.nf
          name | NAMES name1 [name2 ...]
          [PATHS path1 [path2 ... ENV var]]
          [VERSIONS version1 [version2]]
          [DOC "cache documentation string"]
         )
.fi




This command is used to find a full path to the named jar. A cache entry named by <VAR> is created to stor the result of this command. If the full path to a jar is found the result is stored in the variable and the search will not repeated unless the variable is cleared. If nothing is found, the result will be <VAR>\-NOTFOUND, and the search will be attempted again next time find_jar is invoked with the same variable. The name of the full path to a file that is searched for is specified by the names listed after NAMES argument. Additional search locations can be specified after the PATHS argument. If you require special a version of a jar file you can specify it with the VERSIONS argument. The argument after DOC will be used for the documentation string in the cache.


install_jar(TARGET_NAME DESTINATION)


This command installs the TARGET_NAME files to the given DESTINATION. It should be called in the same scope as add_jar() or it will fail.


install_jni_symlink(TARGET_NAME DESTINATION)


This command installs the TARGET_NAME JNI symlinks to the given DESTINATION. It should be called in the same scope as add_jar() or it will fail.


create_javadoc(<VAR>


.nf
                PACKAGES pkg1 [pkg2 ...]
                [SOURCEPATH <sourcepath>]
                [CLASSPATH <classpath>]
                [INSTALLPATH <install path>]
                [DOCTITLE "the documentation title"]
                [WINDOWTITLE "the title of the document"]
                [AUTHOR TRUE|FALSE]
                [USE TRUE|FALSE]
                [VERSION TRUE|FALSE]
               )
.fi




Create jave documentation based on files or packages. For more details please read the javadoc manpage.


There are two main signatures for create_javadoc. The first signature works with package names on a path with source files:


.nf
   Example:
   create_javadoc(my_example_doc
     PACKAGES com.exmaple.foo com.example.bar
     SOURCEPATH ${CMAKE_CURRENT_SOURCE_PATH}
     CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
     WINDOWTITLE "My example"
     DOCTITLE "<h1>My example</h1>"
     AUTHOR TRUE
     USE TRUE
     VERSION TRUE
   )
.fi




The second signature for create_javadoc works on a given list of files.


.nf
   create_javadoc(<VAR>
                  FILES file1 [file2 ...]
                  [CLASSPATH <classpath>]
                  [INSTALLPATH <install path>]
                  [DOCTITLE "the documentation title"]
                  [WINDOWTITLE "the title of the document"]
                  [AUTHOR TRUE|FALSE]
                  [USE TRUE|FALSE]
                  [VERSION TRUE|FALSE]
                 )
.fi




Example:


.nf
   create_javadoc(my_example_doc
     FILES ${example_SRCS}
     CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
     WINDOWTITLE "My example"
     DOCTITLE "<h1>My example</h1>"
     AUTHOR TRUE
     USE TRUE
     VERSION TRUE
   )
.fi




Both signatures share most of the options. These options are the same as what you can find in the javadoc manpage. Please look at the manpage for CLASSPATH, DOCTITLE, WINDOWTITLE, AUTHOR, USE and VERSION.


The documentation will be by default installed to


.nf
   ${CMAKE_INSTALL_PREFIX}/share/javadoc/<VAR>
.fi




if you don't set the INSTALLPATH.


.TP
.B UseJavaClassFilelist
.nf
 
.fi




This script create a list of compiled Java class files to be added to a jar file. This avoids including cmake files which get created in the binary directory.


.TP
.B UseJavaSymlinks
.nf
 
.fi




Helper script for UseJava.cmake


.TP
.B UsePkgConfig
Obsolete pkg\-config module for CMake, use FindPkgConfig instead.




This module defines the following macro:


PKGCONFIG(package includedir libdir linkflags cflags)


Calling PKGCONFIG will fill the desired information into the 4 given arguments, e.g. PKGCONFIG(libart\-2.0 LIBART_INCLUDE_DIR LIBART_LINK_DIR LIBART_LINK_FLAGS LIBART_CFLAGS) if pkg\-config was NOT found or the specified software package doesn't exist, the variable will be empty when the function returns, otherwise they will contain the respective information


.TP
.B UseQt4
Use Module for QT4

Sets up C and C++ to use Qt 4.  It is assumed that FindQt.cmake has already been loaded.  See FindQt.cmake for information on how to load Qt 4 into your CMake project.

.TP
.B UseSWIG
SWIG module for CMake

Defines the following macros:


.nf
   SWIG_ADD_MODULE(name language [ files ])
     \- Define swig module with given name and specified language
   SWIG_LINK_LIBRARIES(name [ libraries ])
     \- Link libraries to swig module
.fi

All other macros are for internal use only. To get the actual name of the swig module, use: ${SWIG_MODULE_${name}_REAL_NAME}. Set Source files properties such as CPLUSPLUS and SWIG_FLAGS to specify special behavior of SWIG. Also global CMAKE_SWIG_FLAGS can be used to add special flags to all swig calls. Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify  where to write all the swig generated module (swig \-outdir option) The name\-specific variable SWIG_MODULE_<name>_EXTRA_DEPS may be used to specify extra dependencies for the generated modules. If the source file generated by swig need some special flag you can use SET_SOURCE_FILES_PROPERTIES( ${swig_generated_file_fullname}


.nf
        PROPERTIES COMPILE_FLAGS "\-bla")
.fi

.TP
.B Use_wxWindows
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-




This convenience include finds if wxWindows is installed and set the appropriate libs, incdirs, flags etc. author Jan Woetzel <jw \-at\- mip.informatik.uni\-kiel.de> (07/2003)


USAGE:


.nf
   just include Use_wxWindows.cmake
   in your projects CMakeLists.txt
.fi

INCLUDE( ${CMAKE_MODULE_PATH}/Use_wxWindows.cmake)


.nf
   if you are sure you need GL then
.fi

SET(WXWINDOWS_USE_GL 1)


.nf
   *before* you include this file.
.fi

.TP
.B UsewxWidgets
Convenience include for using wxWidgets library.

Determines if wxWidgets was FOUND and sets the appropriate libs, incdirs, flags, etc. INCLUDE_DIRECTORIES and LINK_DIRECTORIES are called.


USAGE


.nf
  # Note that for MinGW users the order of libs is important!
  FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
  INCLUDE(${wxWidgets_USE_FILE})
  # and for each of your dependent executable/library targets:
  TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
.fi




DEPRECATED


.nf
  LINK_LIBRARIES is not called in favor of adding dependencies per target.
.fi




AUTHOR


.nf
  Jan Woetzel <jw \-at\- mip.informatik.uni\-kiel.de>
.fi

.TP
.B WriteBasicConfigVersionFile
.nf
 
.fi

.nf
  WRITE_BASIC_CONFIG_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion) )
.fi




Writes a file for use as <package>ConfigVersion.cmake file to <filename>. See the documentation of FIND_PACKAGE() for details on this.


.nf
    filename is the output filename, it should be in the build tree.
    major.minor.patch is the version number of the project to be installed
.fi

The COMPATIBILITY mode AnyNewerVersion means that the installed package version will be considered compatible if it is newer or exactly the same as the requested version. If SameMajorVersion is used instead, then the behaviour differs from AnyNewerVersion in that the major version number must be the same as requested, e.g. version 2.0 will not be considered compatible if 1.0 is requested. If your project has more elaborated version matching rules, you will need to write your own custom ConfigVersion.cmake file instead of using this macro.


Example:


.nf
     write_basic_config_version_file(${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
                                     VERSION 1.2.3
                                     COMPATIBILITY SameMajorVersion )
     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
                   ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake
             DESTINATION lib/cmake/Foo )
.fi




Internally, this macro executes configure_file() to create the resulting version file. Depending on the COMPATIBLITY, either the file BasicConfigVersion\-SameMajorVersion.cmake.in or BasicConfigVersion\-AnyNewerVersion.cmake.in is used. Please note that these two files are internal to CMake and you should not call configure_file() on them yourself, but they can be used as starting point to create more sophisticted custom ConfigVersion.cmake files.

.SH COPYRIGHT
.PP
Copyright 2000\-2009 Kitware, Inc., Insight Software Consortium.  All rights reserved.

.PP
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

.PP
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

.PP
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

.PP
Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.

.PP
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

.SH SEE ALSO
.PP
.B ccmake(1), cpack(1), ctest(1), cmakecommands(1), cmakecompat(1), cmakemodules(1), cmakeprops(1), cmakevars(1)

.PP
The following resources are available to get help using CMake:

.TP
.B Home Page
http://www.cmake.org

The primary starting point for learning about CMake.

.TP
.B Frequently Asked Questions
http://www.cmake.org/Wiki/CMake_FAQ

A Wiki is provided containing answers to frequently asked questions. 

.TP
.B Online Documentation
http://www.cmake.org/HTML/Documentation.html

Links to available documentation may be found on this web page.

.TP
.B Mailing List
http://www.cmake.org/HTML/MailingLists.html

For help and discussion about using cmake, a mailing list is provided at cmake@cmake.org. The list is member\-post\-only but one may sign up on the CMake web page. Please first read the full documentation at http://www.cmake.org before posting questions to the list.

.PP
Summary of helpful links:


.nf
  Home: http://www.cmake.org
  Docs: http://www.cmake.org/HTML/Documentation.html
  Mail: http://www.cmake.org/HTML/MailingLists.html
  FAQ:  http://www.cmake.org/Wiki/CMake_FAQ
.fi

